Click here to Skip to main content
15,904,828 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralWindows Service and MFC Pin
Braulio Dez8-Oct-03 23:10
Braulio Dez8-Oct-03 23:10 
GeneralRe: Windows Service and MFC Pin
Anand Paranjpe9-Oct-03 1:08
Anand Paranjpe9-Oct-03 1:08 
GeneralRe: Windows Service and MFC Pin
Atif Mushtaq10-Oct-03 0:23
Atif Mushtaq10-Oct-03 0:23 
QuestionHow to invoke IE in VC6.0 console application? Pin
George28-Oct-03 23:00
George28-Oct-03 23:00 
AnswerRe: How to invoke IE in VC6.0 console application? Pin
Mike Dimmick9-Oct-03 0:29
Mike Dimmick9-Oct-03 0:29 
GeneralRe: How to invoke IE in VC6.0 console application? Pin
George29-Oct-03 0:37
George29-Oct-03 0:37 
GeneralRe: How to invoke IE in VC6.0 console application? Pin
Mike Dimmick9-Oct-03 1:02
Mike Dimmick9-Oct-03 1:02 
GeneralRe: How to invoke IE in VC6.0 console application? Pin
George29-Oct-03 2:19
George29-Oct-03 2:19 
Thanks, Mike buddy!

I have tried your method in my VC++ 6.0 console application, but there are 5 errors. Here are the source codes:

Source Code:

----------
#include <shellapi.h>
#include <windows.h>

int main (int argc, char** argv)
{
SHELLEXECUTEINFO sei = { 0 };
sei.cbSize = sizeof( sei );
// Add the SEE_MASK_NOCLOSEPROCESS flag
// if you want to wait until the browser is closed
sei.fMask = SEE_MASK_FLAG_NO_UI | SEE_MASK_FLAG_DDEWAIT;
sei.lpVerb = _T( "open" ); // Could leave NULL
sei.lpFile = _T( "myfile.htm" );
sei.nShow = SW_SHOWNORMAL;
//ShellExecute(0, "open", "iexplore.exe", "http://www.codeguru.com", "c:\\", SW_SHOWNORMAL);
ShellExecuteEx (&sei);

return 0;
}
----------

Here are the error messages:

----------
c:\program files\microsoft visual studio\vc98\include\shellapi.h(53) : error C2065: 'HDROP' : undeclared identifier
c:\program files\microsoft visual studio\vc98\include\shellapi.h(53) : error C2501: 'DECLARE_HANDLE' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\shellapi.h(55) : error C2146: syntax error : missing ';' before identifier 'UINT'
c:\program files\microsoft visual studio\vc98\include\shellapi.h(55) : error C2501: 'DECLSPEC_IMPORT' : missing storage-class or type specifiers
c:\program files\microsoft visual studio\vc98\include\shellapi.h(55) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

LoadHtml.exe - 5 error(s), 0 warning(s)
----------

Can you help?


regards,
Geo

GeneralRe: How to invoke IE in VC6.0 console application? Pin
Mike Dimmick9-Oct-03 22:28
Mike Dimmick9-Oct-03 22:28 
GeneralRe: How to invoke IE in VC6.0 console application? Pin
George210-Oct-03 17:25
George210-Oct-03 17:25 
GeneralProblem with mixing managed and unmanaged code Pin
morefalt8-Oct-03 23:00
morefalt8-Oct-03 23:00 
GeneralRe: Problem with mixing managed and unmanaged code Pin
Anthony_Yio9-Oct-03 2:49
Anthony_Yio9-Oct-03 2:49 
GeneralRe: Problem with mixing managed and unmanaged code Pin
morefalt9-Oct-03 4:00
morefalt9-Oct-03 4:00 
GeneralRe: Problem with mixing managed and unmanaged code Pin
Anthony_Yio9-Oct-03 17:21
Anthony_Yio9-Oct-03 17:21 
GeneralHelp needed in running a C++ Program as Windows Service Pin
sarathymail8-Oct-03 22:33
sarathymail8-Oct-03 22:33 
GeneralRe: Help needed in running a C++ Program as Windows Service Pin
Mike Dimmick9-Oct-03 0:37
Mike Dimmick9-Oct-03 0:37 
Generalproblem of icons Pin
sarasara09876548-Oct-03 21:39
sarasara09876548-Oct-03 21:39 
GeneralRe: problem of icons Pin
jhwurmbach9-Oct-03 0:27
jhwurmbach9-Oct-03 0:27 
GeneralRe: problem of icons Pin
David Crow9-Oct-03 2:42
David Crow9-Oct-03 2:42 
Questionhow can i get the computer name&amp;ip in local network? Pin
Hellin8-Oct-03 20:28
Hellin8-Oct-03 20:28 
AnswerRe: how can i get the computer name&amp;ip in local network? Pin
twing8-Oct-03 21:25
twing8-Oct-03 21:25 
GeneralRe: how can i get the computer name&amp;ip in local network? Pin
Hellin8-Oct-03 21:47
Hellin8-Oct-03 21:47 
GeneralRe: how can i get the computer name&amp;ip in local network? Pin
twing8-Oct-03 22:05
twing8-Oct-03 22:05 
GeneralRe: how can i get the computer name&amp;ip in local network? Pin
Hellin8-Oct-03 22:10
Hellin8-Oct-03 22:10 
GeneralRe: how can i get the computer name&ip in local network? Pin
David Crow9-Oct-03 3:18
David Crow9-Oct-03 3:18 

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.