Please help me I lost my night sleep. Tell in simple code.
From my VB client I am passing simple string "Siddharth", to a win32 dll function GetUserName(DATATYPE)(if DAtatype is BSTR or wstring tell me how to convert it into string in dll function declaration). My program should run in 98 as well as NT. I am trying lot of examples but they all are for long. When I convert it to string nothing works out.
Dim x as string
x = "String"
// BSTR_str contains an ANSI string
CString_str = (LPCTSTR)BSTR_str;
// BSTR_str contains an UNICODE string
CString_str = (LPCWSTR)BSTR_str;
char *temp = LPSTR(CString_str);
further if u have to include MFC support at the time of creating new ATL project
"the value of ESP was not properly saved across a function call." i got this error dialog while compiling a MFC client. the MFC client is empty except for a ATL control added to the UI. the ATL control is empty too. Just as it was 1st created by the wizard.
any idea what's wrong?
apparently the problem is with the compiling computer. it works fine in other computers. i tried installing MS SDK, VC++ SP5, clearing up the registry... and nothing works.. haha.. will be installing a new copy of VC++ today.. thanks for all the help guys. BUnch of great ppl we have here!!!
I have a com object in which there are different properties. When i get these values through it works well when property is returning long or some other integer but it crashes when property is returning bstr. Take a look at my code and guide me that what i did wrong.
memset(&pvResult, 0, sizeof pvResult);
Thanx in advance
The EOF marker has arisen from its MS-DOS grave to cause troubles for me -- I have an ifstream (which I open with the ios::binary flag specified) that refuses to read past a 0x1A byte. What am I doing wrong? The only calls I make are:
Bingo! thanks, that's it -- the "ios::in || ios::binary" will of course resolve to 1, instead of the bitmap that I want. Thanks again; sometimes I need someone else to look at my code and point out the obvious mistake.
Does anybody know, how I can convert an in-proc server project written in ATL 3.0 (VC++ 6.0) to local server (exe version) or vice versa?
I mean that what changes, I have to make to the project settings and maybe to the source code and/or other files in the project? I have seen a sample project "ADOSAMP" that has several project settings for building dll or exe versions.
Last Visit: 31-Dec-99 19:00 Last Update: 7-Dec-21 14:26