Zload dll?
Zload dll?
Is there an OLE DLL i can call from my windows code that would allow me to provide a very simple way to download zbasic binaries to my customers?
Zload is to difficult for end users to work with.
Thanks,
-Mike
Zload is to difficult for end users to work with.
Thanks,
-Mike
Re: Zload dll?
I've been asking for either a DLL or a standalone GUI app but, so far, to no avail.mdown wrote:Is there an OLE DLL i can call from my windows code that would allow me to provide a very simple way to download zbasic binaries to my customers? Zload is to difficult for end users to work with.
In the meantime, if your main problem is with users who don't understand zload command lines you might be able to shell to zload and eliminate the need for them to deal with it. They'll still see the ugly console app, though.
Zload dll?
For this app it would be VB6 for simplicity.
I just need somthing i can send my end users that works quick and easy without having to send the zbasic gui.
-Mike
I just need somthing i can send my end users that works quick and easy without having to send the zbasic gui.
-Mike
Can VB6 provide a callback routine? It seems to me that I read somewhere something about using AddressOf to do so. I'm thinking of an API that would supply a callback for progress updates. That way, the calling application can represent the progress in any suitable fashion.
The API might be something like the following (described in VB syntax):
The value returned by the API would be a success indication or error status code. The callback would be coded something like:
The value returned by the callback indicates whether to continue the download or abort.
The API might be something like the following (described in VB syntax):
Code: Select all
Public Declare Function ZXDownload Lib "zxutil.dll" (
ByVal lpFileName As String,
ByVal wPort as Integer,
ByVal lpProgress as Long,
ByVal dwData as Long) as Integer
Code: Select all
Public Function UpdateDownloadProgress(
ByVal wPercentComplete as Integer,
ByVal dwData) As Integer
' add code to update the progress indicator here
End Function
- Don Kinzer
Please don't do it that way. VB4-32, which I use, cannot handle callbacks.dkinzer wrote:Can VB6 provide a callback routine?
I prefer passing the handle of a window to which the DLL can pass back messages as I've suggested previously. If you're going to use a callback, let me know now so I can quit wasting time, effort and money on a dead-end.
Zload dll?
I'm not sure about the AddressOf operator, but if you called ZXDownload asynchronously and then looped the call to UpdateDownloadProgress if could be done that way.
Although an OLE interface with events would be nice...
-Mike
Although an OLE interface with events would be nice...
-Mike
Re: Zload dll?
There will be an alternate API that utilizes a window handle instead of a the more general solution of using a callback.dhouston wrote:Please don't do it that way. VB4-32, which I use, cannot handle callbacks. I prefer passing the handle of a window to which the DLL can pass back messages[...]
I'll make a standard DLL and you can put an OLE wrapper around it if you'd like.mdown wrote:Although an OLE interface with events would be nice...
- Don Kinzer
Re: Zload dll?
Actually, I think a more general solution would be a standalone GUI app similar to what NetMedia gave me. I had a Download Firmware menu item in my Windows interface. When the user clicked on the menu item, I closed the serial port, shelled to the downloader, waited for it to finish and then reopened the port. I had a delay at the beginning of my BX-24 code to allow time to reopen the port. The user then saw all of the sign-on messages. It was pretty seamless and could be used from almost any programming language.dkinzer wrote:There will be an alternate API that utilizes a window handle instead of a the more general solution of using a callback.
The user had to select the file and port from the downloader app's menu but this could be done on the command line. There was an INI file item for the title bar of the app. I documented its use in my user manual. You can see a copy at http://jeffvolp.home.att.net/bx24-aht/manual.pdf.
The VB4-32 code was quite simple.
Code: Select all
Private Sub mnuBXB_Click()
mscomm1.PortOpen = False
WaitForProcessToEnd "BX_OEM_Downloader.exe"
Sleep 100
mscomm1.PortOpen = True
End Sub
Public Sub WaitForProcessToEnd(cmdLine As String)
Dim retVal As Long
Dim pID As Long
Dim pHandle As Long
pID = Shell(cmdLine)
pHandle = OpenProcess(&H100000, True, pID)
retVal = WaitForSingleObject(pHandle, -1&)
End Sub
Last edited by DH* on 28 June 2006, 4:45 AM, edited 1 time in total.
Right you are! Thankfully, it seems to be C rather than C++ or C#.dhouston wrote:I believe the C++ source for ZLoad is included in the ZBasic package.stevech wrote:I'd volunteer to write and contribute such a utility- similar to BLIPS that I have done for re-flashing AVRs. But I'd need the protocol specs and/or source to zload.
It needs to be GUI-ized.
And the VM side needs a way for the user program to trigger a download reception rather than as now, only via the tickle of the serial port DTR
You might want to hold off for a few days. The code is being refactored to make it more modular.stevech wrote:I'd volunteer to write and contribute such a utility- similar to BLIPS that I have done for re-flashing AVRs. But I'd need the protocol specs and/or source to zload.
Last edited by dkinzer on 27 June 2006, 23:18 PM, edited 1 time in total.
- Don Kinzer
I misremembered that it was .cpp.stevech wrote:Right you are! Thankfully, it seems to be C rather than C++ or C#.dhouston wrote:I believe the C++ source for ZLoad is included in the ZBasic package.
That sounds great - two birds, one stone.It needs to be GUI-ized.
And the VM side needs a way for the user program to trigger a download reception rather than as now, only via the tickle of the serial port DTR