troubleshooting Question

dll.. XP vs. 98/Me

Avatar of d32coder
d32coder asked on
Delphi
5 Comments1 Solution203 ViewsLast Modified:
Any ideas?
look at this dll (the ShellExecute line), it doesn't open the exe in 98 or Me but will in XP.  

---------
library EZServe;

uses
  SysUtils, Classes, dialogs, ShellAPI, Windows, Messages;

{$R *.res}

function SendData(mWnd,aWnd: HWND; data, parms: PChar; show,nopause: LongBool): integer; Stdcall;
 var hWnd: THandle; cds: CopyDataStruct;
begin
    hWnd := FindWindow(nil,'EZServe v1.0');
    if hWnd <> 0 then
      begin
       cds.dwData := 3232;
       cds.cbData := StrLen(Data);
       cds.lpData := data;
       SendMessage(hWnd, WM_COPYDATA, 0, LongInt(@cds));
      end;
  Result := 1;
End;

function OpenEzServe(mWnd,aWnd: HWND; data, parms: PChar; show,nopause: LongBool): integer; Stdcall;
 var hWnd: THandle;
begin
    hWnd := FindWindow(nil,'mIRC');
    if not FileExists('EZServe.exe') then Showmessage('EZSere.exe not found.');
    ShellExecute(hWnd,'open','EZServe.exe',data,nil,SW_SHOWNORMAL);
    Result := 1;
End;

exports SendData,OpenEzServe;

END.

ASKER CERTIFIED SOLUTION
mikepj

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros