Click here to Skip to main content
15,891,033 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How do i create an Executable (.exe) to debug my project? Pin
Cedric Moonen3-Apr-09 7:16
Cedric Moonen3-Apr-09 7:16 
GeneralRe: How do i create an Executable (.exe) to debug my project? Pin
bulg3-Apr-09 8:09
bulg3-Apr-09 8:09 
GeneralRe: How do i create an Executable (.exe) to debug my project? Pin
Cedric Moonen3-Apr-09 22:26
Cedric Moonen3-Apr-09 22:26 
GeneralRe: How do i create an Executable (.exe) to debug my project? Pin
Iain Clarke, Warrior Programmer4-Apr-09 0:08
Iain Clarke, Warrior Programmer4-Apr-09 0:08 
QuestionRe: How do i create an Executable (.exe) to debug my project? Pin
David Crow3-Apr-09 3:08
David Crow3-Apr-09 3:08 
AnswerRe: How do i create an Executable (.exe) to debug my project? Pin
bulg3-Apr-09 6:46
bulg3-Apr-09 6:46 
AnswerRe: How do i create an Executable (.exe) to debug my project? Pin
sashoalm4-Apr-09 2:32
sashoalm4-Apr-09 2:32 
Questionproblem importing a com file in c++ Pin
snouto3-Apr-09 1:16
snouto3-Apr-09 1:16 
Hello everyone .

i am trying to import a COM file in vc++ project but the generated .tlh file from the com file seems to have an inherit errors , i successfully added #import directive in my stdafx.h file with the full phyiscal path to my com file then i included stdafx.h into my stdafx.cpp file , then i compile
the studio generates for me a .tlh file but that file seems to have errors in it .

the following code in the generated .tlh file has the problem

<br />
struct __declspec(uuid("92d8ec9e-550e-4525-a858-c8601ad50703"))<br />
_VoiceNumbers : IDispatch<br />
{<br />
    //<br />
    // Property data<br />
    //<br />
<br />
    <big>__declspec(property(get=GetVoiceNumbers))<br />
    _CollectionPtr VoiceNumbers;</big><br />
<br />
    //<br />
    // Wrapper methods for error-handling<br />
    //<br />
<br />
    long Count ( );<br />
    HRESULT Delete (<br />
        long Index );<br />
    HRESULT Add (<br />
        struct _PhoneNumber * oAdd );<br />
    _PhoneNumberPtr Item (<br />
        long Index );<br />
    IUnknownPtr NewEnum ( );<br />
    _CollectionPtr GetVoiceNumbers ( );<br />
<br />
    //<br />
    // Raw methods provided by interface<br />
    //<br />
<br />
      virtual HRESULT __stdcall raw_Count (<br />
        /*[out,retval]*/ long * _arg1 ) = 0;<br />
      virtual HRESULT __stdcall raw_Delete (<br />
        /*[in]*/ long Index ) = 0;<br />
      virtual HRESULT __stdcall raw_Add (<br />
        /*[in]*/ struct _PhoneNumber * oAdd ) = 0;<br />
      virtual HRESULT __stdcall raw_Item (<br />
        /*[in]*/ long Index,<br />
        /*[out,retval]*/ struct _PhoneNumber * * _arg2 ) = 0;<br />
      virtual HRESULT __stdcall raw_NewEnum (<br />
        /*[out,retval]*/ struct IUnknown * * _arg1 ) = 0;<br />
      virtual HRESULT __stdcall get_VoiceNumbers (<br />
        /*[out,retval]*/ struct _Collection * * _arg1 ) = 0;<br />
};<br />


the bolded code part has the problem and the following errors are

<br />
Error	1	error C2146: syntax error : missing ';' before identifier 'VoiceNumbers'	d:\hitech work\jniwork\testingrex\testingrex\debug\resumemirror.tlh	893	TestingRex<br />
Error	2	error C4430: missing type specifier - int assumed. Note: C++ does not support default-int	d:\hitech work\jniwork\testingrex\testingrex\debug\resumemirror.tlh	893	TestingRex<br />
Error	3	error C2208: 'ResumeMirror::VoiceNumbers' : no members defined using this type	d:\hitech work\jniwork\testingrex\testingrex\debug\resumemirror.tlh	893	TestingRex<br />
Error	4	fatal error C1903: unable to recover from previous error(s); stopping compilation	d:\hitech work\jniwork\testingrex\testingrex\debug\resumemirror.tlh	893	TestingRex<br />
<br />


i am trying to make a wrapper for that com file to be able to call it from java using JNI technology .

each time i try to solve the errors , and compile again the studio generates for me another .tlh file as earlier one that has the same errors and i don't know what to do .

anyone has any solution for that please

Human knowledge belongs to the world.

AnswerRe: problem importing a com file in c++ Pin
Stuart Dootson3-Apr-09 2:40
professionalStuart Dootson3-Apr-09 2:40 
GeneralRe: problem importing a com file in c++ Pin
snouto3-Apr-09 2:43
snouto3-Apr-09 2:43 
GeneralRe: problem importing a com file in c++ Pin
Stuart Dootson3-Apr-09 2:46
professionalStuart Dootson3-Apr-09 2:46 
GeneralRe: problem importing a com file in c++ Pin
snouto3-Apr-09 2:51
snouto3-Apr-09 2:51 
GeneralRe: problem importing a com file in c++ Pin
Stuart Dootson3-Apr-09 3:01
professionalStuart Dootson3-Apr-09 3:01 
GeneralRe: problem importing a com file in c++ Pin
snouto3-Apr-09 2:55
snouto3-Apr-09 2:55 
GeneralRe: problem importing a com file in c++ Pin
Stuart Dootson3-Apr-09 3:02
professionalStuart Dootson3-Apr-09 3:02 
GeneralRe: problem importing a com file in c++ Pin
snouto3-Apr-09 3:04
snouto3-Apr-09 3:04 
GeneralRe: problem importing a com file in c++ Pin
Stuart Dootson3-Apr-09 6:41
professionalStuart Dootson3-Apr-09 6:41 
GeneralRe: problem importing a com file in c++ Pin
snouto3-Apr-09 3:06
snouto3-Apr-09 3:06 
GeneralRe: problem importing a com file in c++ Pin
snouto3-Apr-09 3:21
snouto3-Apr-09 3:21 
GeneralRe: problem importing a com file in c++ Pin
Vozzie29-Apr-09 0:52
Vozzie29-Apr-09 0:52 
GeneralRe: problem importing a com file in c++ Pin
Stuart Dootson9-Apr-09 0:58
professionalStuart Dootson9-Apr-09 0:58 
GeneralRe: problem importing a com file in c++ Pin
Vozzie29-Apr-09 3:06
Vozzie29-Apr-09 3:06 
GeneralRe: problem importing a com file in c++ Pin
Stuart Dootson9-Apr-09 3:10
professionalStuart Dootson9-Apr-09 3:10 
QuestionData processing in MATLAB, searching over a large amount of folders Pin
moose242-Apr-09 23:00
moose242-Apr-09 23:00 
AnswerRe: Data processing in MATLAB, searching over a large amount of folders Pin
Stuart Dootson2-Apr-09 23:37
professionalStuart Dootson2-Apr-09 23:37 

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.