| |

VerySource

 Forgot password?
 Register
Search
View: 2980|Reply: 11

Problems calling dll written by vc ++

[Copy link]

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-3-12 14:30:01
| Show all posts |Read mode
Declare DLL call caused an exception error during the call
Don't know who can help?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-6-7 12:00:02
| Show all posts
There should be a problem with the call parameters
Reply

Use magic Report

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-6-9 00:45:01
| Show all posts
Checked a lot of things
The general conclusion is that there is a problem with the parameters
C++ requires a 1025 bit String
This thing I stored in the meno type field in the table, after taking out, use type() to check that the type is U
I don't know if this is the reason
Reply

Use magic Report

0

Threads

18

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 Singapore

Post time: 2020-6-9 07:45:01
| Show all posts
Either there is a problem with Dll writing itself, or it is a problem with a wrong statement.
Reply

Use magic Report

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-6-12 03:45:01
| Show all posts
Declare no error
Is there any problem
The statement is like this
declare method in ***.dll string arg
Help to see if there is any problem
Thank you
Reply

Use magic Report

0

Threads

18

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 Singapore

Post time: 2020-6-13 15:15:02
| Show all posts
The declaration will not report an error. How you declare it, call it when you call it.

In this situation, what do you ask you to help?

If you don’t know anything, you know that something went wrong. Just guess.

You have written the entire statement in full, and the C++ DLL was written by you. If not,

What is the function to do? These are unclear and must be wrong.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-6-14 13:30:02
| Show all posts
It is possible that you have not written the data type
Reply

Use magic Report

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-6-15 00:30:01
| Show all posts
c++ is a decryption process
Is to decrypt the incoming parameters and return
The parameters are already mentioned above
Is a string of length 1025
The string is saved in the memo field
Pass it to the method after reading
The statement is: = method(string)

The declaration is declare string method in ***.dll string arg

I don’t know if this is clear~

Ha ha! ~ Thanks! !
Reply

Use magic Report

1

Threads

6

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-6-15 17:15:02
| Show all posts
toellery

I also suspect that there is a problem with the data type
After the data saved in the memo type field is taken out to the variable
Use type() to check the type is U
But how can it be converted to C?
In addition, I have another vc++ dll that requires the parameter to be a path of type string
This path is obtained through getfile()
Use type() to see the type is also U, there is no problem when calling
Make me dizzy~~

PS: I don’t see it very often, but there are still many enthusiastic people here.
Reply

Use magic Report

0

Threads

18

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 Singapore

Post time: 2020-7-11 15:15:01
| Show all posts
Let me talk about the status of parameter transfer first. In fact, when all the parameters are passed, the DLL does not matter
Yours, it just takes your parameters according to its own declaration, therefore, according to your later description
You just use it for encryption and decryption, so you don't need to call this DLL at all, some in VFP. If you must
Call, change your statement:

   declare Integer method in ***.dll string arg @

The returned value can't be a string, so you don't have to count on Declare String.
Only Declare Integer, secondly, the string passed by String arg is to be solved
Secret, all pass its address so that the DLL can write the decrypted string into the Dll, so
To add @, there is no description of the original DLL, it can only be estimated. Check the return value and see if arg is already
Decrypted.

   When calling
   Store "fgdsafdsafas" To arg
   ?Method(@arg)
   ?arg

   If you are not familiar with Dll's statement at all, it is not clear, give it up. There are too many things to encrypt and decrypt.
You can't use this.
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