Click here to Skip to main content
15,886,067 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Help with Error Pin
Stephane Rodriguez.8-Oct-02 6:24
Stephane Rodriguez.8-Oct-02 6:24 
GeneralRe: Help with Error Pin
Michael Dunn8-Oct-02 19:10
sitebuilderMichael Dunn8-Oct-02 19:10 
GeneralRe: Help with Error Pin
Le centriste21-Oct-02 18:15
Le centriste21-Oct-02 18:15 
General<map>memory freeing issue Pin
fordge7-Oct-02 20:56
fordge7-Oct-02 20:56 
GeneralRe: <map>memory freeing issue Pin
Paul M Watt8-Oct-02 7:04
mentorPaul M Watt8-Oct-02 7:04 
GeneralRe: <map>memory freeing issue Pin
Todd Smith8-Oct-02 14:01
Todd Smith8-Oct-02 14:01 
GeneralATL Error: i386\chkesp.c (ADO) Pin
leonwoo7-Oct-02 19:35
leonwoo7-Oct-02 19:35 
GeneralNeed help--> BSTR in ATL Pin
leonwoo6-Oct-02 22:29
leonwoo6-Oct-02 22:29 
Hi,
I am a newbie in ATL and have a question that hope you can answer it. The question is that I am trying to convert a BSTR type variable into a LPCTSTR type. I used the _com_util to do it but when i compiled the program, errors appear. I created the ATL project using the ATL wizard and the error message i received was

--------------------------------------------------------------------------
The original source code:
STDMETHODIMP CIniLoader::GetPrivateProfileString(BSTR bsSection, BSTR bsEntry, BSTR *bsOutput)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())

LPCTSTR lpSection = _com_util::ConvertBSTRToString(bsSection);

return S_OK;
}

The Error message
{C:\temp\Project\PlatformManager\IniLoader.cpp(45) : error C2653: '_com_util' : is not a class or namespace name
C:\temp\Project\PlatformManager\IniLoader.cpp(45) : error C2065: 'ConvertBSTRToString' : undeclared identifier}

----------------------------------------------------------------------
I tried to include the header file 'comutil.h' into the project and added an extra line 'using namespace _com_util' into the implementation but another different errors appeared.

--------------------------------------------------------------------------
Creating library Debug/PlatformManager.lib and object Debug/PlatformManager.exp
IniLoader.obj : error LNK2001: unresolved external symbol "char * __stdcall _com_util::ConvertBSTRToString(unsigned short *)" (?ConvertBSTRToString@_com_util@@YGPADPAG@Z)
Debug/PlatformManager.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

I have no idea which portion of the code went wrong...please help...

thanks in advance.


leonwoo
GeneralRe: Need help--> BSTR in ATL Pin
Nick Parker7-Oct-02 2:00
protectorNick Parker7-Oct-02 2:00 
GeneralRe: Need help--> BSTR in ATL Pin
leonwoo7-Oct-02 15:57
leonwoo7-Oct-02 15:57 
GeneralRe: Need help--> BSTR in ATL Pin
Nick Parker8-Oct-02 3:19
protectorNick Parker8-Oct-02 3:19 
GeneralRe: Need help--> BSTR in ATL Pin
Michael Dunn7-Oct-02 4:35
sitebuilderMichael Dunn7-Oct-02 4:35 
GeneralRe: Need help--> BSTR in ATL Pin
Nick Parker7-Oct-02 8:01
protectorNick Parker7-Oct-02 8:01 
GeneralRe: Need help--> BSTR in ATL Pin
Michael Dunn7-Oct-02 8:13
sitebuilderMichael Dunn7-Oct-02 8:13 
GeneralRe: Need help--> BSTR in ATL Pin
Nick Parker7-Oct-02 8:37
protectorNick Parker7-Oct-02 8:37 
GeneralYou are great...... Pin
leonwoo7-Oct-02 14:43
leonwoo7-Oct-02 14:43 
GeneralDifference between ReleaseMinSize and ReleaseMinDependency Pin
ahsanjamal6-Oct-02 19:28
ahsanjamal6-Oct-02 19:28 
GeneralRe: Difference between ReleaseMinSize and ReleaseMinDependency Pin
Michael Dunn7-Oct-02 4:39
sitebuilderMichael Dunn7-Oct-02 4:39 
QuestionATL and Threads... where to start? Pin
LukeV4-Oct-02 11:04
LukeV4-Oct-02 11:04 
AnswerRe: ATL and Threads... where to start? Pin
Michael Dunn4-Oct-02 11:45
sitebuilderMichael Dunn4-Oct-02 11:45 
GeneralRe: ATL and Threads... where to start? Pin
LukeV7-Oct-02 3:21
LukeV7-Oct-02 3:21 
GeneralRe: ATL and Threads... where to start? Pin
Michael Dunn7-Oct-02 4:40
sitebuilderMichael Dunn7-Oct-02 4:40 
GeneralRe: ATL and Threads... where to start? Pin
Jörgen Sigvardsson11-Oct-02 4:01
Jörgen Sigvardsson11-Oct-02 4:01 
GeneralRe: ATL and Threads... where to start? Pin
Michael Dunn11-Oct-02 5:53
sitebuilderMichael Dunn11-Oct-02 5:53 
Generalunresolved external when adding WTL to ATL project Pin
LukeV2-Oct-02 14:16
LukeV2-Oct-02 14:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.