| |

VerySource

 Forgot password?
 Register
Search
Author: tassdar34

Problems calling dll written by vc ++

[Copy link]

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 Unknown

 Author| Post time: 2020-8-2 10:45:01
| Show all posts
The problem is found
Dll problem
The type definition when accepting parameters in dll is cString
Should actually be defined as lptSTR

In addition, my statement ended up like this
declare string method in ***.dll String arg
No problem after running
Reply

Use magic Report

0

Threads

18

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2020-8-2 18:15:01
| Show all posts
No problem is no problem, but it is impossible to return a string to VFP in Dll.
It can only be processed by parameter passing. I have written many DLLs. If you follow your definition above

declare string method in ***.dll String arg

Then, the content contained in your arg cannot be written by Dll, it can only be read.
And what comes back depends on how you wrote it in Dll. If it is an integer, it returns normally.
If it is a string, an error will occur.

Hope you understand.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list