Search found 4 matches

by plopzz
Mon Apr 28, 2003 12:53 am
Forum: Coding Questions
Topic: New question about dll and passing ....
Replies: 6
Views: 1549

Procedurereturn must return the status (and nothing else)

This is what i had understand (for the moment :p)

First call of dll : app call with buflen = 0 .. At this time, i return the length (sizeof) of structure in the buffer (its a pointer, so i directly pokeL in memory :/ )...

my structure have ...
by plopzz
Sun Apr 27, 2003 6:54 pm
Forum: Coding Questions
Topic: New question about dll and passing ....
Replies: 6
Views: 1549

Anyway, you don't need to return the pointer to the Buffer, since the caller supplies it.

From the doc of app :
------------------------------------------------------------------------
Arguments :
BUFLEN
After the function is performed, this variable returns the actual buffer length occupied ...
by plopzz
Sun Apr 27, 2003 1:20 pm
Forum: Coding Questions
Topic: New question about dll and passing ....
Replies: 6
Views: 1549

If the structure is declared in the DLL, Buflen must be at least SizeOf(structure) bytes in size, spo you shouldn't need to pass it.


Structure MyStruc
value1.l
value2.l
EndStructure

ProcedureDLL namefunction(Buffer)
*foo.MyStruc = Buffer
*foo\value1 = 1
*foo\value2 = 2
ProcedureReturn ...
by plopzz
Sun Apr 27, 2003 12:56 pm
Forum: Coding Questions
Topic: New question about dll and passing ....
Replies: 6
Views: 1549

New question about dll and passing ....

I try now to make 1 dll who have to passing a structure to caller

i call like this :

Result = namefunction(Buflen,Buffer)

dll have to return a structure (buflen = size of structure and buffer = pointer of structure)

so how i can return the structure in the dll ???

I have declared the structure ...