I need to create a Java-COM bridge for a COM method. I have a Java application that needs to access two methods. One is simple and returns a single reference parameter of type long, and the more complex method is as follows from the reference manual (The return value is a long):
GetAveragedMassSpectrum(long FAR* pnScanNumbers, long nScansToAverage,BOOL bCentroidResult, VARIANT FAR* pvarMassList, VARIANT FAR* pvarPeakFlags, long FAR* pnArraySize)
Parameters:
pnScanNumbers - A valid pointer to an array of scan numbers that this routine will average.
nScansToAverage - The number of scans that are averaged.
bCentroidData - A flag indicating if the data is centroided before it is returned by this function.
pvarMassList - A valid pointer to a VARIANT variable to receive the mass list data.
pvarPeakFlags - A valid pointer to a VARIANT variable to receive the peak flag data.
pnArraySize - A valid pointer to a long variable to receive the number of data peaks returned in the mass list array.
Remarks:
The mass list contents are returned in a SafeArray attached to the pvarMassList VARIANT variable. When passed in, the pvarMassList variable must exist and be initialized to VARIANT type VT_EMPTY. If the function returns successfully, pvarMassList is set to type VT_ARRAY | VT_R8. The format of the mass list returned is an array of double precision values in mass intensity pairs in ascending mass order (for example, mass 1, intensity 1, mass 2, intensity 2, mass 3, intensity 3, etc.).
This will need to work on a 64 bit Windows, and the reference library will be provided. I have successfully connected to this library using both Jacob and J-Interop but I am having a hard time getting this method to function properly. I also have example code for this method from the reference manual, if needed. I have posted this job and accepted a bidder but I would like to accept more bids at this time.