Downloading your own DLL as a debug module in C # Managed Code for Windows CE

I am writing a Windows CE application in C # that references my own C ++ DLL (which I also encode) using the following method:

   [DllImport("CImg_IP_CE.dll")]
   public static unsafe extern void doBlur(byte* imgData, int sigma);

This works fine, but I cannot debug the dll. When I check the debug modules that load after starting the EXE, CImg_IP_CE.dll is not one of them. Even after successfully calling functions from the DLL, it still does not appear in the list of modules.

Looking around it seems that the LoadLibrary () function might work, but I cannot find examples of using this in a C # Windows CE application. How can I do this, or is there a better way to make sure the DLL is loading for debugging?

+3
source share
3 answers

I found the answer to this post:

http://www.eggheadcafe.com/conversation.aspx?messageid=31762078&threadid=31762074

So the same question was asked, and the answer was as follows:

No, you cannot switch from managed code by calling P / Invoke to native code in the Smart Device debugger. Perhaps you can use Attach to the process of performing your own debugging (using the built-in DLL project loaded into this instance of VS2005) or just write debugging information from the native DLL for the serial port or something like that. It really is not very common, though, where you really need to move from one to another.

Further in the thread, someone figured out how to do this:

, - "" DLL. , , EXE, DLL DLL ( DLL, ). , EXE , DLL , ! , , DLL, DLL ( ), .

, # DLL, - . , DLL , Remote Executable EXE Debugging, , DLL, . ... !

+4

, , WinCE . ( #), native ( , DLL), .

#, : (Ctrl + F5 Debug → Start Without Debugging), Debug → Attach to Process, "Transport" "Smart Device", "Qualifier", "" " " "". , , DLL, ...

+1

DLL, , , , DLL. , , .

C DLL, ++/CLI, #

0
source

Source: https://habr.com/ru/post/1712358/


All Articles