Ken Henderson's WebLog

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.  
Published Monday, July 24, 2006 3:28 PM by khen1234

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Adrian said:

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
July 25, 2006 7:41 AM
 

Ellen said:

Thank you!
[url=http://pgolgpgt.com/cxtg/bchi.html]My homepage[/url] | [url=http://fzfofjdy.com/onxh/hpzd.html]Cool site[/url]
September 4, 2006 6:09 PM
 

Troy said:

Well done!
<a href="http://pgolgpgt.com/cxtg/bchi.html">My homepage</a> | <a href="http://vlubqbbn.com/xyso/uzmd.html">Please visit</a>
September 4, 2006 6:10 PM
 

Shawn said:

September 4, 2006 6:10 PM
 

Alan said:

Thank you!
[url=http://szkrswmp.com/rxxh/sqqo.html]My homepage[/url] | [url=http://obdfjxiq.com/wwrc/wlin.html]Cool site[/url]
September 10, 2006 9:44 PM
 

Holly said:

Nice site!
<a href="http://szkrswmp.com/rxxh/sqqo.html">My homepage</a> | <a href="http://qbfjnkdy.com/lwwk/wbqv.html">Please visit</a>
September 10, 2006 9:44 PM
 

Laura said:

September 10, 2006 9:45 PM
 

Lane said:

Well done!
[url=http://xeosktta.com/frcp/jwpu.html]My homepage[/url] | [url=http://fdidjwad.com/qroy/ulpv.html]Cool site[/url]
September 24, 2006 7:39 PM
 

Janice said:

Nice site!
<a href="http://xeosktta.com/frcp/jwpu.html">My homepage</a> | <a href="http://oibbzaqc.com/mgsy/ltyz.html">Please visit</a>
September 24, 2006 7:40 PM
 

Jane said:

September 24, 2006 7:40 PM

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Submit

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker