Click here to Skip to main content
15,902,938 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: TV Tuner Capture Pin
Digaleet12-Nov-05 12:51
Digaleet12-Nov-05 12:51 
AnswerRe: TV Tuner Capture Pin
LaHaHa12-Nov-05 21:01
LaHaHa12-Nov-05 21:01 
Question*.vcproj Is this a VC++ file Pin
vikas amin12-Nov-05 2:07
vikas amin12-Nov-05 2:07 
AnswerRe: *.vcproj Is this a VC++ file Pin
Mircea Puiu12-Nov-05 3:39
Mircea Puiu12-Nov-05 3:39 
AnswerRe: *.vcproj Is this a VC++ file Pin
Gary R. Wheeler12-Nov-05 6:25
Gary R. Wheeler12-Nov-05 6:25 
GeneralRe: *.vcproj Is this a VC++ file Pin
vikas amin12-Nov-05 21:16
vikas amin12-Nov-05 21:16 
Question*.vcproj Is this a VC++ file Pin
vikas amin12-Nov-05 2:06
vikas amin12-Nov-05 2:06 
QuestionATL COM String Property issue Pin
Axonn Echysttas12-Nov-05 0:48
Axonn Echysttas12-Nov-05 0:48 
Hi everybody ::- ). I got an issue with some ATL thingy I'm working on. I made an ATL DLL which I use in Visual Basic 6. To set or get a string property I use BSTR, since Visual Basic uses this type. A value from VB6 successfully reaches VC++ 6. But not the other way around. Here's the VC++ code.

BSTR test; //<- this is actually declared in the CASDINIFile class.<br />
STDMETHODIMP_(HRESULT) CASDINIFile::get_ASDOperator(BSTR *pVal)<br />
{<br />
	AFX_MANAGE_STATE(AfxGetStaticModuleState())<br />
		<br />
		pVal = &test;<br />
	<br />
	return NULL;<br />
}<br />
<br />
STDMETHODIMP_(HRESULT) CASDINIFile::put_ASDOperator(BSTR newVal)<br />
{<br />
	AFX_MANAGE_STATE(AfxGetStaticModuleState())<br />
		<br />
		test = newVal;<br />
	<br />
	return NULL;<br />
}


The VB code isn't of relevance. I say myatlobj.ASDOperator = "bla bla" and then try to query the value (and I get nothing). Of course, the problem lies in this line probably:

pVal = &test;

So the function REQUIRES me to give pVal a BSTR *. So I give the address of &test but obviously, it ain't working since probably VB 6 wants a simple BSTR. If I try to change the BSTR * to BSTR I this error from VC++:

error MIDL2121 : [out] only parameter must not derive from a top-level [unique] or [ptr] pointer/array : [ Type 'wireBSTR' ( Parameter 'pVal' ) ]

-= E C H Y S T T A S =-
The Greater Mind Balance
AnswerRe: ATL COM String Property issue Pin
Gary R. Wheeler12-Nov-05 6:44
Gary R. Wheeler12-Nov-05 6:44 
GeneralRe: ATL COM String Property issue Pin
Axonn Echysttas12-Nov-05 8:23
Axonn Echysttas12-Nov-05 8:23 
GeneralRe: ATL COM String Property issue Pin
Gary R. Wheeler12-Nov-05 10:26
Gary R. Wheeler12-Nov-05 10:26 
GeneralRe: ATL COM String Property issue Pin
Axonn Echysttas12-Nov-05 13:14
Axonn Echysttas12-Nov-05 13:14 
GeneralRe: ATL COM String Property issue Pin
Gary R. Wheeler12-Nov-05 15:36
Gary R. Wheeler12-Nov-05 15:36 
GeneralRe: ATL COM String Property issue Pin
Axonn Echysttas12-Nov-05 20:37
Axonn Echysttas12-Nov-05 20:37 
Questionunicode problem Pin
torniker11-Nov-05 22:15
torniker11-Nov-05 22:15 
AnswerRe: unicode problem Pin
Jacky Tsee12-Nov-05 6:09
Jacky Tsee12-Nov-05 6:09 
GeneralRe: unicode problem Pin
torniker13-Nov-05 0:32
torniker13-Nov-05 0:32 
GeneralRe: unicode problem Pin
Gary R. Wheeler13-Nov-05 4:52
Gary R. Wheeler13-Nov-05 4:52 
QuestionWndows hook Pin
act_x11-Nov-05 22:07
act_x11-Nov-05 22:07 
QuestionMSHFlexGrid problem (First-chance exception in ACE.exe (MSHFLXGD.OCX): 0xC0000005: Access Violation.) Pin
lcm311-Nov-05 18:45
lcm311-Nov-05 18:45 
QuestionProblem in using SAFEARRAY Pin
BlrBoy11-Nov-05 18:40
BlrBoy11-Nov-05 18:40 
AnswerRe: Problem in using SAFEARRAY Pin
Mircea Puiu12-Nov-05 3:54
Mircea Puiu12-Nov-05 3:54 
QuestionShowing and hiding Pin
romuzu11-Nov-05 16:56
romuzu11-Nov-05 16:56 
AnswerRe: Showing and hiding Pin
vikas amin11-Nov-05 23:00
vikas amin11-Nov-05 23:00 
AnswerRe: Showing and hiding Pin
Rajesh R Subramanian13-Nov-05 21:39
professionalRajesh R Subramanian13-Nov-05 21:39 

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.