-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
complete example #84
Comments
Well, after you, I was already thinking about this :) Probably this is really good idea to aggregate different ideas for beginners and not only! But, Olaf, about #83, you already have a working export and moreover its successful importing too on C++. Thus, your problem may be exactly from logic of using your mentioned "the Neural Networks" library: incorrect initialization, invalid data, or even null and the related unhandled exception from managed side, stack corruption, stack overflow, and lot of other bugs. For example, I'm seeing that you have Unhandled exception (KernelBase.dll) when calling at specific non-zero addr. Therefore you need to inspect data and internal logic of your called function. You need to debug this yourself or provide this for someone to help with debugging of your 3rd-party code. Can you provide this project for debug? Or try to add try/catch for catching possible exceptions in managed side, if it's not a stack or some internal problems with marshaling, probably will help. About some complete examples, I'll review this soon! Stay in touch. |
and no. in my old task only the compiling worked, not the export |
@haller9816 I'm starting new repo - https://github.com/3F/Examples
I general, this repository will contain complete examples for various projects like: DllExport, Conari, GetNuTool, vsSolutionBuildEvent, MvsSln, ... This already contains complete example for you:
You have address of found exported function by GetProcAddress()! Therefore, you have a working dll-importing from .net library. Otherwise it should return NULL. Check this out. p.s. *Denis (Денис), not a Dennis. |
Hi Denis (исвений неправильно написание имя или имени), thank you very much for these examples. I will try this in a few days. Олаф |
Well, the main logic of the BasicExport example was written on C++ (as unmanaged part). .net libraries via C# and VB.NET just contains something for demonstration of work. But, now you can also try this for your real library, like: PEModule lib(_T("Path_to_your_Library.dll"));
double result = lib.call<double>("Netz", 24.781); I also configured debugging as mixed type via .user file specially for you (usually these are ignored files for SCM). Now, just add breakpoint in your managed function on vb.net, and press F5 I also added some try/catch handling for system errors. Now it can be more clearly with your problem. offtopic (click to expand):
"исвений" seems you want to say "извините" or "извини" (less formal) this similar to "простите", "прошу прощения", and so on. Then, after fixing the end of the words should be like: ~ Ничего страшного, Олаф :) |
@3F Олаф |
Hi Denis, hi all,
sorry again.
As you know I have my problems with the C++/VB.NET solution with DLLExport (and with the C++ language per se and how it looks wit VB.NET and C#.NET). I really tried it a long time.
Now I hope by going onother way I can produce a running solution.
Do you have a complete (and simple) project with source (C++/C#) codes with using DLLExport? Here I could find only program pieces and the screencast, where I don't know, what is important.
Or did I missed something?
I'm really better in mathematical and technical calculations than in programming. For the science things my expiriences in programming with Fortran were enogh, but here I find my limits,
Olaf
The text was updated successfully, but these errors were encountered: