I've got a bunch of dll libraries written in VB that I would like to use within C++ (I'm using C++ within VS .NET).
I've gone through the archives, but can't find anything that provides examples of how to incorporate and use the dll functions.
Does anyone have any pointers or examples?
Thanks in advance,
First of all, I hope this is the right place to post this thread...
I have recently received code which I must re-compile, the only thing is that the code was compiled in VS 2003 .Net, and I'm trying to re-compile it in VS 2005. I'm receiving alot of errors, and I have no Idea how to fix them, could any one please help??!!??
Thanx in advance.
Error 1 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ" (?.cctor@@$$FYMXXZ) Stdafx.obj
Error 2 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ" (?.cctor@@$$FYMXXZ) AssemblyInfo.obj
Error 3 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ" (?.cctor@@$$FYMXXZ) AssemblyInfo.obj
Error 4 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ" (?.cctor@@$$FYMXXZ) Gdi.obj
Error 5 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ" (?.cctor@@$$FYMXXZ) Gdi.obj
Error 6 fatal error LNK1120: 1 unresolved externals c:\ID Print Source\IDCardPrint 2005-11-22\Native\bin\Release\Native.dll 1
Error 7 fatal error C1189: #error : Please use the /MD switch for _AFXDLL builds C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\afxver_.h 77
Error 9 'Could not load file or assembly 'Syncfusion.Core' or one of its dependencies. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))' C:\ID Print Source\IDCardPrint 2005-11-22\IDDesign\LC IDDesign
Error 11 'Could not load file or assembly 'Syncfusion.Core' or one of its dependencies. Invalid pointer (Exception from HRESULT: 0x80004003 (E_POINTER))' C:\ID Print Source\IDCardPrint 2005-11-22\IDDesignApp\LC IDDesignApp
The only programmers that are better than C programmers are those who code in 1's and 0's.....
I wrote a native C++ dll which contains a class to hook windows messages.
As the callback function, I send a function pointer to my callback which is inside of my dll, but outside of the class.
I want a new instance of the function to be created for each instance of the class.
However, I can't declare my callback as non-static.
If I move my callback inside the class, and remove the static keyword I get a compile error saying:
"error C2440: 'type cast' : cannot convert from 'overloaded-function' to 'HOOKPROC'".
With that said, how can I workaround this issue?
I need my callback to use instance variables, but of course it's not possible as they have to be static also.
If I use static variables it won't be any good to me...
Is it a callback that doesn't have a userdata parameter of some kind? Generally you can pass
an instance reference/pointer to methods that use a callback which will be passed to the callback.
In the callback it is cast to the proper type and used to access members. If it's your own
callback scheme then it should be easy to add a parameter.
I'm not sure I understand...
Could you please rephrase it...?
I was referring to callbacks like the one used with EnumChildWindows() where there's a parameter
(app-defined) that you can pass to EnumChildWindows() which will be passed to the callback
fuction. You can pass an object pointer as this parameter and retrieve it in the static callback
and use it to access members of the object class.
With SetWindowsHookEx() you don't have this available. You're going to need an object reference
or pointer in the callback to get at any of the object class' non-static members. You could
store this pointer/reference somewhere - global variable, static member variable. Without it
you only have access to static members, as you know.
You could store this pointer/reference somewhere - global variable, static member variable.
I was thinking of holding a static list to all class instances.
Each constructor call would add the this pointer to the list.
The class would have an inner callback function.
The callback sent to SetWindowsHookEx() would then run a loop and call the inner callback inside each of the list's elements.
MessageBox::Show("Username must be at least 4 char long, it can contain letters and numbers. Maximum lneght is 13 char");
Error 1 error C2352: 'System::Text::RegularExpressions::Regex::IsMatch' : illegal call of non-static member function c:\projects\cddvdorganizer\cddvdorganizer\frmAddUser.h 281
How can i avoid this problem.
Thanks in advance
Last Visit: 31-Dec-99 18:00 Last Update: 25-Sep-23 17:16