Re: Blat and Windows 7 (64)
| Newsgroups | gmane.mail.blat |
|---|---|
| Message-ID | <F651CD7AF1B14D35BFEC3A3AE7480E07@chip> |
> I would love to use the dll - where will I find 'how to' please? > > I've delved a bit deeper and my problem has more than 1 layer of troubles. When the batch file is run with ShellExecute (with the appropriate parameters to invoke cmd) it is unable to find Blat (which I placed in C:Windows\System32) - however when I use a cmd window Blat is found. As a work-around I've placed Blat.exe in the same folder that my batch file is create in. The command line options available for Blat.exe are also available for Blat.dll. The primary entry points into blat.dll are: Send, Blat, SetPrintFunc, and cSend. These are all defined in blatdll.h that is included with the normal download. If you are writing a 64-bit Delphi application, then you will want to download and use the 64-bit flavor. If your application is intended to be used with Windows 98 or WinME, then you want to get the 32-bit version specific to Win98/Me. Otherwise, the normal 32-bit version for Windows 2000 and newer would work fine. Windows 98 and ME do not support Unicode, so Blat.exe / Blat.dll for those versions of Windows is compiled to accept Multi Byte Character Set (MBCS) as its primary input. For Windows 2000 and newer, Blat.exe and Blat.dll are built to accept Unicode as its primary input. Whichever blat.dll you use, the source should be able to convert whichever input you give it to what the source needs; Unicode –> MBCS, or MBCS –> Unicode. From your description about where Blat.exe is placed and able to execute from, it seems that Delphi’s ShellExecute function is not searching the PATH environment for the requested command to execute. Have you tried telling ShellExecute() to use cmd.exe to then launch your batch file? Something similar to ShellExecute( “cmd.exe start /min /separate blatbatch.bat” )? Chip