I got a friend who made some cool functions dealing with encryption and security that he made me in C++. He then used themidia to make it more secure and such.
He gave me the DLL and I used a function finder to find all the functions. But here is the problem.
All functions have an @ symbol in them, and when in C# I use a DLL important it says can’t compile code for it is a syntax error on the @. For example a function name might be “CheckPassword_@12” which is weird, but C# wont allow me to have that.
Is there something I am missing, he wont give me a unsecured DLL for he does not want people if they crack my application to be able to modify his DLL. I checked multiple applications and did stuff my self but all the functions names are coming up with a @.
Thanks!
That makes more sense than your question. The StdCall calling convention puts an underscore before the identifier, a
@nafter the identifier. This name decoration helps to catch declaration errors in a C program. You simply omit them, the pinvoke marshaller can reverse-engineer the property export name. StdCall is the default so this is good enough:Btw, I meant to say EntryPoint instead of ExactSpelling in my comment.
One more detail, you may need to use the CharSet property in the declaration. Whether you need it depends on the string type that the DLL author used. A DLL writer normally also supplies a .h file with the function declarations. Such an .h file would also say
passwordValidand not_passwordValid@8. Do make sure you have the legal right to use this DLL, not having such a header file is very unusual.