Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Procedure in DLL

Status
Not open for further replies.

lespaul

Programmer
Feb 4, 2002
7,083
US
I am trying to develop a DLL for my project so I don't have to have the same code in different forms. One of the things I want to put in the DLL is a procedure. Is this possible or can I only put functions? There is no return value for the procedure and I'm not sure of the syntax for the declaration. Any help would be appreciated.
Leslie
landrews@metrocourt.state.nm.us

SELECT * FROM USERS WHERE CLUE > 0
No Rows Returned
 
Hi,

There are a couple of threads on DLL's that could help you , try searhing the forum [peace].

The other thing is can you put your Procedures and routines into a unit for your application, a unit does not need to have a form and you can reference it from any of your forms. [thumbsup]

Kind Regards, Paul Benn

**** Never Giveup, keep trying, the answer is out there!!! ****
 
Hi,

yes you can use also a procedure instead of a function. If you only want that your code is central then you should use a extra unit. This is much easier to program, especially during the testing of the code.
 
Thanks for the responses! I have already created a unit named WordFunctions. I put 2 or 3 functions that work fine. The problem with the procedure (I think) is that I did not put a return value in this statement:

function PaperCheck(ftype: string):integer;stdcall;
procedure LabelPrint(Word: variant;wrdDoc: variant; ftype: string;bararray: array of string):(expecting return type here!);stdcall;

But the procedure doesn't have a return! Do I need to have this particular procedure in it's own unit?

Thanks!
Leslie
landrews@metrocourt.state.nm.us

SELECT * FROM USERS WHERE CLUE > 0
No Rows Returned
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top