HELP - I need help

"Shawn Deggans" <[email protected]> Thu, 14 Aug 2003 12:51:28 -0500
Newsgroups gmane.comp.lang.delphi.programming
Message-ID <[email protected]>
Okay, my cries for help didn't grab anyone's interest. No problem. I've
downloaded the evaluation edition and have figured out how to make and
ActiveX dll - woo-hoo, I'm on my way to the big time. My only problem
now is that I haven't got a clue how I'm supposed to declare a signed
64-bit integer. Any help? Here is the code I have so far.

'**************************************************************
library MyDll;

uses
  SysUtils,
  Classes;

//TSID is declared as signed 64-bit integer. <--Where? How?

//function which converts numerical SID to 16-character string:

function GetSIDKey(SID:TSID): TSIDKey;
var
  CharNum: byte;
  Bytes: TSIDBytes absolute SID;
begin
  Result:='';
  for CharNum:= 0 to SizeOf(TSID)-1 do
    Result:=Result+char((Bytes[CharNum] div 16)+ord('A'))+
                   char((Bytes[CharNum] mod 16)+ord('A'));
end;



//function which converts 16-character string to numerical SID:

function GetSIDFromKey(Key:TSIDKey):TSID;
var
  Bytes:TSIDBytes;
  CharNum:byte;
begin
  for CharNum:=0 to SizeOf(TSID)-1 do
    Bytes[CharNum]:=(byte(Key[CharNum*2+1])-ord('A'))*16+
                    (byte(Key[CharNum*2+2])-ord('A'));
  move(bytes,Result,sizeof(bytes));
end;


exports GetSIDKey,GetSIDFromKey; //You Must do this so you can find the
name of the function in the dll so for each function or procedure you
must export the main name
{$R *.res}

begin
end.

***********************************************************************

First, does this look right. Second, how do I declare the variable for
the integer.



Thanks,


Shawn Deggans
 


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/i7folB/TM
---------------------------------------------------------------------~->

CodeCoffer - new Delphi code protection Tool!
http://www.delphicollection.com/public/CodeCoffer.htm
---------------------------------------------------------------
Unsubscribe:[email protected]
List owner:[email protected]
--------------------------------------------------------------- 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/