WinMain hidden powers
-
Like most people here, I like small, compact and optimized code. Therefore I among other things, I ignore the default libraries when I can, and use a
void main()
instead of the default WinMain entrypoint. I was implemeting ADO as described here[^] in an app, which has such a void main() entry point. After successfully instantiating a ADODB.Connection object, I cannot use any of its functions normally.pConn->Open(...)
causes an unknown exception,pConn->raw_Open(...)
works fine.pConn->Execute(...)
causes an unknown exception,pConn->raw_Execute(...)
works fine. then after changing thevoid main
to the standard WinMain, everything pConn 'behaves' normal. What is void main() lacking, what WinMain isn't? Georg Haan, NL -
Like most people here, I like small, compact and optimized code. Therefore I among other things, I ignore the default libraries when I can, and use a
void main()
instead of the default WinMain entrypoint. I was implemeting ADO as described here[^] in an app, which has such a void main() entry point. After successfully instantiating a ADODB.Connection object, I cannot use any of its functions normally.pConn->Open(...)
causes an unknown exception,pConn->raw_Open(...)
works fine.pConn->Execute(...)
causes an unknown exception,pConn->raw_Execute(...)
works fine. then after changing thevoid main
to the standard WinMain, everything pConn 'behaves' normal. What is void main() lacking, what WinMain isn't? Georg Haan, NLYou're using the
#import
wrappers, right? Those use_bstr_t
which is a MS-provided class that definitely needs the CRT. Not linking with the CRT is causing your troubles. --Mike-- Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer My really out-of-date homepage Sonork-100.19012 Acid_Helm