Home > database >  How to call DLL in pb pointer parameter
How to call DLL in pb pointer parameter

Time:09-28

Written in vc DLL, the name for the vc. The DLL, the function name is void inside the test (char * p), the parameter description: * p is 356 bytes of the first address of an array of char types, need good pre-allocated space in the main program, then the first address as parameters. The return value: no after the success of the function, the DLL will send a message to the main program, and data will be collected 356 bytes space filling is good. The message types: ok success falied failure
Message # # define ok WM_user + 900 success
Message # # define failed WM_user + 901 failure
I so call: in the pb Subroutine test (ref string ls_zw) library "vc. DLL
"String ls_zw
Ls_zw=space (356)
Enroll (ls_zw)
Messagebox (" ", ls_zw)
After execution, ls_zw is empty, no know is no execution success, or my grammar have a problem, and I like to the message number, take. Be urgent!

CodePudding user response:

Pbm_custom01 corresponding Windows WM_USER
WM_USER=1024
User-defined events

The User - Defined Event original concept Event ID
WM_USER pbm_custom01
.
.
WM_USER + 74 pbm_custom75

CodePudding user response:

String ls_zw
Ls_zw=space (356)
Enroll (ls_zw)
Messagebox (" ", ls_zw)
This can look

In the void test (char * p), to a pointer assignment, don't delete, finally let pb to release the block of memory

CodePudding user response:

Subroutine test (ref string ls_zw) library "vc. DLL
"

String ls_zw
Ls_zw=space (356)
Enroll (ref ls_zw)//add a ref try again
Messagebox (" ", ls_zw)

CodePudding user response:

Void WINAPI test (char * p)

To this definition

CodePudding user response:

Pb char is in it?

CodePudding user response:

Void WINAPI test (char * p) have like this?
  • Related