Hello,
Thank you for all the comments. I didn't see the attached file with the
fix, but I thought I would include the original source file and let you
know what I did to fix it. The reason I did not originally include the
source is that I wanted to make sure it was not proprietary before I
sent it out. The original source code is pasted in after the email,
however the problem appears to be the #include "matrix.h" line after the
include of the mex.h file. If I remove this line, the code compiles. I
end up with a linking problem due to a lib file incompatibility, but
that's not an octave problem.
Again, thanks for all the help. I'd like to see the trivial file that
was mentioned previously, but the attachment didn't come through. I
didn't attach any additional files to this because it looks like they
are being stripped.
Regards,
Dave Rainey
/******************************************************************
* CloseQuickUSB - Mex Function to close the Quick USB board.
*
* [rc] = CloseQuickUSB(USBDevice)
*
* Inputs:
* USBDevice: (UINT32) A handle to the open device.
*
* Outputs:
* rc (Matlab double value) 0 - No Error
*
* 06-28-2002 MTL High Level Design Written
* 07-08-2002 MTL C-Code completed
******************************************************************/
#include <windows.h>
#include "QuickUSB.h"
#include "mex.h"
#include "matrix.h"
// MEX Function Definition
void mexFunction( int nlhs, mxArray *plhs[],
int nrhs, const mxArray *prhs[] )
{
int rc=0;
HANDLE *QUSBdev;
// Check number of args
if (nrhs != 1 ) {
mexErrMsgTxt("Usage: CloseQuickUSB(USBDevice)\n");
}
// Check type & array size of args
if (!mxIsClass(prhs[0], "uint32") ||((mxGetM(prhs[0]) !=1) ||
(mxGetN(prhs[0]) !=1))){
mexErrMsgTxt("Input argument must be a UINT32 value.");
}
/* Get the device handle */
QUSBdev=(HANDLE *)mxGetData(prhs[0]);
// Call the QuickUSBClose function
if (!QuickUsbClose(*QUSBdev)){
mexPrintf("Quick USB close failed.\n");
rc=1;
}
// return code
plhs[0]=mxCreateScalarDouble((double)rc);
}
------------------------------------------------------------------------------------------------
This message is for the designated recipient only and may
contain privileged, proprietary, or otherwise private information.
If you have received it in error, please notify the sender
immediately and delete the original. Any unauthorized use of
this email is prohibited.
------------------------------------------------------------------------------------------------
[mf2]
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Octave-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/octave-dev