15,917,608 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by DarkKobold (Top 4 by date)
DarkKobold
14-Mar-11 18:28pm
View
I had set the DLL wrapper to STDCALL. It turns out that I needed to make sure it was _CDECL calling convention. Thanks for all the help, Olivier!
DarkKobold
9-Mar-11 17:22pm
View
Olivier - Wow, thank you for doing so much research. Unfortunately, that manual has quite a few errors in it, as many functions don't match the calls performed in the SDK. I copied, verbatim, the function calls in their SDK example, (which is a Visual C++ app), and everything works fine except for this one last piece, the callback. (I also tried changing the function call to the one listed in the manual, to no avail.) Also, I am able to compile their example application, and the callback works fine. This is why I think it has something to do with it being wrapped inside a DLL... Do DLLs need something special to have callbacks?
Anyway, I contacted the company to let them know of these errors in the manual, as well as my question about the callback. I understand if you can't help any further, and thanks for everything you've done.
EDIT: Actually, I was thinking about it - maybe I need to send the function address from C#, as a delegate? If somehow it can't address the function inside the DLL, I can send it the same function from C# itself? I have no idea how to do that, but I'm totally lost otherwise.
DarkKobold
8-Mar-11 15:12pm
View
Yes, that returns succeeded as well, as long as the callback assignment is commented out. The only thing that causes the crash is assigning the callback.
DarkKobold
8-Mar-11 11:46am
View
Sorry, I left this out to make an easier read.
hDll = LoadLibrary(TEXT("D:\\WINDOWS\\system32\\DVP7010B.dll"));
if (hDll)
{
AdvDVP_CreateSDKInstence = (ptr_func1)GetProcAddress(hDll, (LPCSTR)"AdvDVP_CreateSDKInstance");
}
else return 2;
if (AdvDVP_CreateSDKInstence)
{
ErrorVal = AdvDVP_CreateSDKInstence((void **)&pDVPSDK);
if (ErrorVal != SUCCEEDED)
return ErrorVal;
}
Also, I am on a 32bit OS, as the driver for this video card only works in 32bit XP.