There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot browser bsod computer connection cpu crash css dell desktop driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor network networking outlook outlook 2003 outlook 2007 outlook express password popups problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
shellexecute


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
jay6's Avatar
Junior Member with 6 posts.
 
Join Date: Jun 2003
19-Jun-2003, 05:34 AM #1
Unhappy shellexecute
Hi
My code goes like this.Compiling it gives no errors. On linking I get the warning
"No module definition file specefied: using defaults"
I cannot give absolute path since I am using in autorun and I wouldnt know the drive letter in user's PC.


#include<string.h>
#include<stdio.h>
#include<windows.h>
#include<shellapi.h>
#include<dir.h>
#include<error.h>

main()
{
int retval;
char buffer[MAXPATH];
char *buffer1="SetUp1.htm";
getcwd(buffer, MAXPATH);
strncat(buffer, buffer1 , 12);
retval=ShellExecute(NULL,"open","explorer.exe",buffer,NULL,SW_SHOWMAXIMIZED );

if (retval==(ERROR_FILE_NOT_FOUND))

{printf("Please download Internet Explorer \n");
printf("If you have IE installed on your machine directly click on SetUp1.htm \n from the CD ROM ");}
return 0;
}


Now when I use start.exe on the CD in autorun file ,using windows 2000 everything is fine. SetUp1.htm opens in a full window in IE.

The same thing run on Windows 98 guves the following error. When I close the error box, it works fine. How do I get rid of this error. Any ideas?
Thanks

START caused a general protection fault
in module START.EXE at 0001:0000352e.
Registers:
EAX=000000b4 CS=4fa7 EIP=0000352e EFLGS=00000206
EBX=122f0d18 SS=1267 ESP=00002252 EBP=80eb2262
ECX=00000014 DS=1267 ESI=00000d12 FS=1227
EDX=005000b4 ES=1267 EDI=00000d1e GS=0000
Bytes at CS:EIP:
c4 5e f4 26 8b 07 3b 46 06 75 69 c4 5e f4 26 8b
Stack dump:
0d120d1e 13e20000 125f1267 36c21267 36282287 1267125f 4fa74cc1 0d120d1e 4fa7016f 00d81267 0ce80d12 4fa754c4 0ce80d12 55052294 00000000 0d120000
brendandonhu's Avatar
Distinguished Member with 15,988 posts.
 
Join Date: Jul 2002
Location: Ann Arbor, MI
Experience: Advanced
19-Jun-2003, 09:26 AM #2
You might want to post this in the development section.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 11:46 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.