I can´t find my fault. Please can anybody help me?
The error comes in:
myWin->init();
the windows message says:
"Unbehandelte Ausnahme bei 0x1022fb10 (msvcr80d.dll) in tstcon32.exe:
0xC0000005: Zugriffsverletzung beim Lesen an Position 0x00000000."
the list of calls in VS says:
"> msvcr80d.dll!strlen(unsigned char * buf=0x0012f074) Zeile 81 Asm
msvcp80d.dll!std::char_traits<char>::length(const char *
_First=0x00000000) Zeile 559 + 0x9 Bytes C++
msvcp80d.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char>
>::assign(const char * _Ptr=0x00000000) Zeile 1042 + 0x9 Bytes C++
msvcp80d.dll!std::basic_string<char,std::char_traits<char>,std::allocator<char>
>::basic_string<char,std::char_traits<char>,std::allocator<char>
>(const char * _Ptr=0x00000000) Zeile 644 C++"
etc...
At compiling time i get the following warnings:
Warnung 12 warning C4996: 'sprintf' wurde als veraltet deklariert
c:\dokumente und einstellungen\entwickler\eigene dateien\visual studio
2005\projects\atltest\atltest\include\opensg\osgbasetypetraits.h 1025
Warnung 13 warning C4996: 'strcpy' wurde als veraltet deklariert
c:\dokumente und einstellungen\entwickler\eigene dateien\visual studio
2005\projects\atltest\atltest\include\opensg\osgbasefunctions.inl 1224
Warnung 14 warning C4996: 'sprintf' wurde als veraltet deklariert
c:\dokumente und einstellungen\entwickler\eigene dateien\visual studio
2005\projects\atltest\atltest\include\opensg\osgfieldcontainerfielddatatype.h
150
Warnung 15 warning C4996: 'strncpy' wurde als veraltet deklariert
c:\dokumente und einstellungen\entwickler\eigene dateien\visual studio
2005\projects\atltest\atltest\include\opensg\osgbasefielddatatype.h 648
Warnung 16 warning C4996: 'sscanf' wurde als veraltet deklariert
c:\dokumente und einstellungen\entwickler\eigene dateien\visual studio
2005\projects\atltest\atltest\include\opensg\osgbasefielddatatype.h 664
I don´t know if i call
myWin->setHwnd (this->m_hWnd);
correctly.
Where should m_hWnd point at? In my code it points at a VS generated
class of the ATL-wizard.
These are my compiler and linker flags:
Compiler:
/Od /I "C:\Dokumente und Einstellungen\Entwickler\Eigene Dateien\Visual
Studio 2005\Projects\AtlTest\AtlTest\include" /D "WIN32" /D "_WINDOWS"
/D "_DEBUG" /D "_USRDLL" /D "NDEBUG" /D "_WIN32" /D "_CONSOLE" /D
"WINVER=0x0400" /D "_WIN32_WINDOWS=0x0410" /D "_WIN32_WINNT=0x0400" /D
"_OSG_HAVE_CONFIGURED_H_" /D "OSG_BUILD_DLL" /D "OSG_DEBUG" /D
"OSG_WITH_GLUT" /D "OSG_WITH_GIF" /D "OSG_WITH_TIF" /D "OSG_WITH_JPG" /D
"_WINDLL" /D "_ATL_DLL" /FD /EHsc /RTC1 /MDd /Yu"stdafx.h"
/Fp"Debug\AtlTest.pch" /Fo"Debug\\" /Fd"Debug\vc80.pdb" /W1 /nologo /c
/ZI /TP /errorReport:prompt
Linker:
/VERBOSE:LIB /OUT:"Debug\AtlTest.dll" /INCREMENTAL /NOLOGO
/LIBPATH:"C:\Dokumente und Einstellungen\Entwickler\Eigene
Dateien\Visual Studio 2005\Projects\AtlTest\AtlTest\lib" /DLL /MANIFEST
/MANIFESTFILE:"Debug\AtlTest.dll.intermediate.manifest"
/DEF:".\AtlTest.def" /DEBUG /PDB:"c:\Dokumente und
Einstellungen\Entwickler\Eigene Dateien\Visual Studio
2005\Projects\AtlTest\AtlTest\Debug\AtlTest.pdb" /MACHINE:X86
/ERRORREPORT:PROMPT MSVCPRTD.lib winmm.lib wsock32.lib OSGBaseD.lib
OSGSystemD.lib OSGWindowWIN32D.lib glu32.lib opengl32.lib tif32.lib
libjpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib
odbccp32.lib
Daniel Zuidinga schrieb:
> Hello mailing-list,
>
> I want to develop a simple COM object (ATL control) in VS2005, so that i
> can use some functions in managed code (C#).
>
> I get the device context in a function of the ATL-Control. But i have
> Problems with the right setting up. I use a WIN32WindowPtr. Is this
> right the right way?
> Moreover i get Linking errors:
>
>
> HGLRC m_hRC;
> HDC m_hDC;
> WIN32WindowPtr myWin;
>
>
> static PIXELFORMATDESCRIPTOR pfd = {
> sizeof(PIXELFORMATDESCRIPTOR), // Size of
> this structure
> 1, // Version of
> this structure
> PFD_DRAW_TO_WINDOW | // Draw to
> Window(not to bitmap)
> PFD_SUPPORT_OPENGL | // Support
> OpenGLcalls in window
> PFD_DOUBLEBUFFER, //
> Doublebuffered mode
> PFD_TYPE_RGBA, // RGBA Color mode
> 24, // Want 24bit
> color
> 0,0,0,0,0,0, // Not used to
> select mode
> 0,0, // Not used to
> select mode
> 0,0,0,0,0, // Not used to
> select mode
> 32, // Size of
> depth buffer
> 0, // Not used to
> select mode
> 0, // Not used to
> select mode
> PFD_MAIN_PLANE, // Draw in main
> plane
> 0, // Not used to
> select mode
> 0,0,0 }; // Not used to
> select mode
>
> // Choose a pixel format that best matches that described in pfd
> nPixelFormat = ChoosePixelFormat(m_hDC, &pfd);
>
> // Create the rendering context
> m_hRC = wglCreateContext(m_hDC);
>
> myWin = WIN32Window::create();
> myWin->setHwnd (this->m_hWnd);
> myWin->setHdc(m_hDC);
> myWin->setHglrc(m_hRC);
>
> // init the OSG window
> myWin->init();
>
>
>
> Moreover i get Linking errors:
>
> Fehler 288 error LNK2001: Nicht aufgelöstes externes Symbol
> ""class osg::NullFieldContainerPtr const osg::NullFC"
> ([EMAIL PROTECTED]@@[EMAIL PROTECTED]@B)". atlCTL.obj
> Fehler 289 error LNK2001: Nicht aufgelöstes externes Symbol
> ""public: static unsigned short const
> osg::FieldContainerPtrBase::InvalidParentEPos"
> ([EMAIL PROTECTED]@osg@@2GB)". atlCTL.obj
> Fehler 290 error LNK2001: Nicht aufgelöstes externes Symbol
> ""protected: static class osg::FieldContainerType osg::Node::_type"
> ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]@A)". atlCTL.obj
> Fehler 291 error LNK2001: Nicht aufgelöstes externes Symbol
> ""private: static class osg::FieldContainerType osg::GroupBase::_type"
> ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]@A)". atlCTL.obj
> Fehler 292 error LNK2001: Nicht aufgelöstes externes Symbol
> ""private: static class osg::FieldContainerType
> osg::TransformBase::_type"
> ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]@A)". atlCTL.obj
> Fehler 293 error LNK2001: Nicht aufgelöstes externes Symbol
> ""private: static class osg::FieldContainerType
> osg::PerspectiveCameraBase::_type"
> ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]@A)".
> atlCTL.obj
> Fehler 294 error LNK2001: Nicht aufgelöstes externes Symbol
> ""private: static class osg::FieldContainerType
> osg::DirectionalLightBase::_type"
> ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]@A)".
> atlCTL.obj
> Fehler 295 error LNK2001: Nicht aufgelöstes externes Symbol
> ""private: static class osg::FieldContainerType
> osg::WIN32WindowBase::_type"
> ([EMAIL PROTECTED]@osg@@[EMAIL PROTECTED]@A)". atlCTL.obj
>
>
> I would be deeply grateful
> <http://dict.leo.org/ende?lp=ende&p=/gQPU.&search=grateful> for an answer.
>
> Daniel
>
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>
>
>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users