New blog


My friend Bart Duncan is now blogging.  Bart is one of the top SQL Server performance experts in the world. You can find his new blog here on MSDN at http://blogs.msdn.com/bartd.  


Comments (10)

  1. Adrian says:

    Hello

    I recently purchased a second hand copy of "Database Developer’s Guide with Delphi 2".  ISBN 0-672-30862-2.

    The copy I purchased did not come with a CD.

    I am currently working through the project detailed in the book, but it keeps failing to compile.

    The current problem I am working on is the DLL, which is detailed on page 327, I have typed the code in word for word about 20 times and I keep getting the following error;

    [error] Reputils.dpr[25]: Types of actual and formal var parameters must be identical

    The code I copied out the book is;

    library Reputils;

    { Important note about DLL memory management: ShareMem must be the

     first unit in your library’s USES clause AND your project’s (select

     Project-View Source) USES clause if your DLL exports any procedures or

     functions that pass strings as parameters or function results. This

     applies to all strings passed to and from your DLL–even those that

     are nested in records and classes. ShareMem is the interface unit to

     the BORLNDMM.DLL shared memory manager, which must be deployed along

     with your DLL. To avoid using BORLNDMM.DLL, pass string information

     using PChar or ShortString parameters. }

    uses

     SysUtils,

     Classes,

     Windows;

    function GetWindowsUserName(UserName : PChar) : PChar; stdcall; export;

    var

     Name : Array[0..30] of char;

     NameLen : Integer;

    begin

     NameLen := sizeof(Name);

     If GetUserName(Name, NameLen) then StrCopy(UserName,Name)

     else StrCopy(UserName, ‘UNKNOWN’);

     Result := UserName;

    end;

    exports

     GetWindowsUserName;

    end.

    I would be grateful for any help, if someone has a copy of the source code for the RentMan (RentalMan) program which came on the CD I would be very grateful if they would let me know.

    regards

    Adrian