S
smith
Hi,
I've got a fair amount of experience with 3rd party industrial fax
solutions, specifically GoldFax and loads of digi and BT boards on Nt4/2k
andf 2k3. In the end faxing is all pretty simple once you get the hardware
set up.
Over the weekend I started working the 2k/2k3/XP code and found it all very
simple too. For the most part it's identical to the older 3rd party
solutions.
But one thing does strike me odd and I wonder if I'm just missing something.
(VB.Net code example)
dim oJobID as object
oJobID = oDoc.ConnectedSubmit(m_oSvr)
the value of oJobID is reported by Visual Studio as being an array of
Strings with a length of 1, so logic would be that using:
Debug.Writeline(Cstr( oJobId(0)) would tell you the actual and true JobID.
So that you could just take that ID and put it in a database and use it
directly later to get the status of the particular print/fax job.
At least, that's the way GoldFax and others work with their JobID returns of
their submission methods.
But instead to get the *actual JobID* with windows fax, you have to register
to receive the server event OnOutgoingJobAdded and in that event you get
the actual and true JobID.
This seems pretty silly to me. I mean, now you have to put your server
connection-closing code into the OnOutgoingJobAdded event stub rather then
just using a logical Send routine to get in, send the fax, get an ID and
get out clean.
Am I missing something here? The docs say that the C++ implementation of
ConnectedSubmit has a pointer to the address of the JobID array but that the
VB/Interop implementation instead returns an HRESULT.
Really I'm wondering what's the point of getting a value that MS calls a
"JobID" returned from ConnectedSubmit in the COM/Interop implementation? Is
that return a memory address that a VB/COM/Interop language has no use for
at all or can we use the return to get the real JobID using perhaps Unsafe
C# (not my forte, so I'd like to know if it's worth the effort before I try
to figure it out) ... or is the "JobID" just some unusable random non-zero
HRESULT value?
Smith
Kirkland, WA
I've got a fair amount of experience with 3rd party industrial fax
solutions, specifically GoldFax and loads of digi and BT boards on Nt4/2k
andf 2k3. In the end faxing is all pretty simple once you get the hardware
set up.
Over the weekend I started working the 2k/2k3/XP code and found it all very
simple too. For the most part it's identical to the older 3rd party
solutions.
But one thing does strike me odd and I wonder if I'm just missing something.
(VB.Net code example)
dim oJobID as object
oJobID = oDoc.ConnectedSubmit(m_oSvr)
the value of oJobID is reported by Visual Studio as being an array of
Strings with a length of 1, so logic would be that using:
Debug.Writeline(Cstr( oJobId(0)) would tell you the actual and true JobID.
So that you could just take that ID and put it in a database and use it
directly later to get the status of the particular print/fax job.
At least, that's the way GoldFax and others work with their JobID returns of
their submission methods.
But instead to get the *actual JobID* with windows fax, you have to register
to receive the server event OnOutgoingJobAdded and in that event you get
the actual and true JobID.
This seems pretty silly to me. I mean, now you have to put your server
connection-closing code into the OnOutgoingJobAdded event stub rather then
just using a logical Send routine to get in, send the fax, get an ID and
get out clean.
Am I missing something here? The docs say that the C++ implementation of
ConnectedSubmit has a pointer to the address of the JobID array but that the
VB/Interop implementation instead returns an HRESULT.
Really I'm wondering what's the point of getting a value that MS calls a
"JobID" returned from ConnectedSubmit in the COM/Interop implementation? Is
that return a memory address that a VB/COM/Interop language has no use for
at all or can we use the return to get the real JobID using perhaps Unsafe
C# (not my forte, so I'd like to know if it's worth the effort before I try
to figure it out) ... or is the "JobID" just some unusable random non-zero
HRESULT value?
Smith
Kirkland, WA