Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C++ dll in C# code
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01599867
Message ID:
01599883
Vues:
127
This message has been marked as a message which has helped to the initial question of the thread.
>The developer suggested the following code to use
>
>
>  [DllImport("ww_local.dll", CallingConvention = CallingConvention.Cdecl)]
>        static extern string Invoke1(string str);
>
>
>so I used it as it. I hope I can involve him directly because I really don't want to go deep into VC++ code or even download it.
>
>Also, when I tried to open this dll with dependency walker, I got an error.
>

Yeah, the calling convention is important if they're using something instead of stdcall.

I wouldn't worry too much about dependency walker errors. It's usually enough to just look through the list of dependencies and see if there are dependencies outside of normal WinAPI ones that might hint at another third party library (It's also handy to see which version of the MSVC* libraries are required since that trips up a lot of things assuming the correct runtimes aren't available).

I usually also just double-check to make sure the function name casing is correct (if C++ you may have to hit F10 to unmangle them).
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform