Thread: ShellExecute doesn't seem to work in Borland

  1. #1
    Registered User
    Join Date
    Jun 2002
    Posts
    79

    ShellExecute doesn't seem to work in Borland

    Hello. I use Borland C++ 5.0. I need to use the ShellExecute() function, but whenever I include the header file shellapi.h I get errors. Also, I am unable to find the import library shell32.lib on my PC. I think this could cause the errors I am getting. Does this happen to other Borland users? Please tell me where I can find the file shell32.lib. I have already tried searching for it on the Borland website.

    Compiler:Borland C++ 5.0

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,934
    Try only including the windows header file:

    #include <windows.h>

  3. #3
    Registered User
    Join Date
    Jun 2002
    Posts
    79
    Hello. I tried including windows.h instead of shellapi.h. However I still get an error. I have attached the source file. The function to check is void update(), and the line no. is 1006. Please tell me what is wrong.

    The line I have inserted is...
    ShellExecute(handle,"open","c:\\Sundeep\\Directory \\homepage.url",NULL,NULL,SW_SHOWMAXIMIZED);

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    You need the shell32.lib.....

    If your compiler doesnt have it, then is it a windows compiler (sorry not familiar with Borland C++ compilers)

    If it is a Windows compiler and you need shell32.lib, then download the Platform SDKI from Microsoft asn that will have all the libraries in their newest form

  5. #5
    Registered User
    Join Date
    Jun 2002
    Posts
    79
    I'm sorry but I do not know whether my compiler is a windows compiler or not, as I am still quite a beginner. Could you please tell me what you mean by that?
    Last edited by sundeeptuteja; 08-06-2002 at 06:46 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 3
    Last Post: 11-17-2008, 12:36 PM
  2. Getting Borland's C++ Builder to work with the ANSI standard.
    By domhnall4h in forum C++ Programming
    Replies: 18
    Last Post: 01-14-2004, 10:17 PM
  3. The Bludstayne Open Works License
    By frenchfry164 in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 11-26-2003, 11:05 AM
  4. help with making Borland C++ compiler work
    By Masada in forum C++ Programming
    Replies: 3
    Last Post: 06-29-2003, 11:02 AM
  5. Expression Manipulator v0.4 (bugs fixed, derivatives work with trig funcs)
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 06-08-2003, 08:10 AM