Click here to Skip to main content
15,910,878 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: Task Scheduler Pin
Stuart Dootson1-Oct-08 7:36
professionalStuart Dootson1-Oct-08 7:36 
QuestionQuestions re. ATL service (EXE) plus ATL simple object Pin
markiemooster30-Sep-08 3:22
markiemooster30-Sep-08 3:22 
AnswerRe: Questions re. ATL service (EXE) plus ATL simple object Pin
led mike30-Sep-08 5:13
led mike30-Sep-08 5:13 
GeneralRe: Questions re. ATL service (EXE) plus ATL simple object Pin
markiemooster30-Sep-08 6:50
markiemooster30-Sep-08 6:50 
AnswerRe: Questions re. ATL service (EXE) plus ATL simple object Pin
Roger Stoltz6-Oct-08 4:51
Roger Stoltz6-Oct-08 4:51 
Questioninclude file for a COM client (consumer) Pin
George_George25-Sep-08 23:59
George_George25-Sep-08 23:59 
AnswerRe: include file for a COM client (consumer) Pin
Stuart Dootson27-Sep-08 4:35
professionalStuart Dootson27-Sep-08 4:35 
GeneralRe: include file for a COM client (consumer) Pin
George_George27-Sep-08 18:56
George_George27-Sep-08 18:56 
Hi Stuart,


If I do not include the .c file, there will be link error. Any ideas?

1>d:\visual studio 2008\projects\testatl2\teststruct1\main.cpp(14) : error C2275: 'TestStrcut1' : illegal use of this type as an expression
1>        d:\visual studio 2008\projects\testatl2\teststruct1\testatl2_i.h(58) : see declaration of 'TestStrcut1'
1>d:\visual studio 2008\projects\testatl2\teststruct1\main.cpp(17) : error C2275: 'ITestStrcut1' : illegal use of this type as an expression
1>        d:\visual studio 2008\projects\testatl2\teststruct1\testatl2_i.h(99) : see declaration of 'ITestStrcut1'


#include "TestATL2_i.h"

int main()
{
	HRESULT     hr;
	ITestStrcut1* pITS;

	CoInitialize (NULL);

	MyValue data; 

	data.x = 5;

	hr = CoCreateInstance ( TestStrcut1,         // CLSID of coclass
							NULL,                    // not used - aggregation
							CLSCTX_INPROC_SERVER,    // type of server
							ITestStrcut1,          // IID of interface
							(void**) &pITS );        // Pointer to our interface pointer

    if ( SUCCEEDED ( hr ) )
    {
        // Tell the COM object that we're done with it.
		hr = pITS->SetMyStruct (&data);
        pITS->Release();
    }
    else
    {
    // Couldn't create the COM object.  hr holds the error code.
	}

	CoUninitialize();

	return 0;
}



regards,
George
GeneralRe: include file for a COM client (consumer) Pin
Stuart Dootson28-Sep-08 3:44
professionalStuart Dootson28-Sep-08 3:44 
GeneralRe: include file for a COM client (consumer) Pin
George_George28-Sep-08 3:53
George_George28-Sep-08 3:53 
GeneralRe: include file for a COM client (consumer) Pin
Stuart Dootson28-Sep-08 6:40
professionalStuart Dootson28-Sep-08 6:40 
GeneralRe: include file for a COM client (consumer) Pin
George_George30-Sep-08 1:13
George_George30-Sep-08 1:13 
GeneralRe: include file for a COM client (consumer) Pin
Stuart Dootson30-Sep-08 10:10
professionalStuart Dootson30-Sep-08 10:10 
GeneralRe: include file for a COM client (consumer) Pin
George_George30-Sep-08 22:33
George_George30-Sep-08 22:33 
QuestionPass Events from ATL control to javascript Pin
chatko25-Sep-08 17:46
chatko25-Sep-08 17:46 
AnswerRe: Pass Events from ATL control to javascript Pin
chatko29-Sep-08 4:05
chatko29-Sep-08 4:05 
QuestionSample application for connecting to Sql server database in ATL Pin
V K 224-Sep-08 23:23
V K 224-Sep-08 23:23 
AnswerRe: Sample application for connecting to Sql server database in ATL Pin
Stuart Dootson25-Sep-08 0:28
professionalStuart Dootson25-Sep-08 0:28 
QuestionActiveX: still active after close IExplorer Pin
fzhsheng24-Sep-08 21:26
fzhsheng24-Sep-08 21:26 
QuestionIssues when pop up a dialog in IE Pin
Robert Wang198324-Sep-08 3:33
Robert Wang198324-Sep-08 3:33 
QuestionHow can i show the string correctly? Pin
hdj831123-Sep-08 22:44
hdj831123-Sep-08 22:44 
AnswerRe: How can i show the string correctly? Pin
Steve Echols24-Sep-08 18:53
Steve Echols24-Sep-08 18:53 
GeneralRe: How can i show the string correctly? Pin
hdj831124-Sep-08 19:18
hdj831124-Sep-08 19:18 
GeneralRe: How can i show the string correctly? Pin
Steve Echols24-Sep-08 19:23
Steve Echols24-Sep-08 19:23 
GeneralRe: How can i show the string correctly? Pin
hdj831124-Sep-08 22:52
hdj831124-Sep-08 22:52 

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.