Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C++ dll in C# code
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01599867
Message ID:
01599883
Views:
126
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform