I have downloaded the software API's for the P5000, I am converting a VB program that ran on the PC3000 series. I have hit a snag with the interface to ps5000GetTimebase widows throws a fixup failure. Depends says I have the right number of parameters. Do you have dll library definitions for P5000 for vb yet, if not could someone tell me what it would be for the above API.
I did and successfully built vb interfaces to several API's but this one doesn't want to play ball. I was hoping one of your software guys had tested the interface and had a draft set of declarations.
What kind of a problem are you having? There is an error in the documentation that will be resolved in the next release. As I said before there should only be 7 parameters in the function calls, so the .chm file is correct however the .pdf has the mistake.
Hi I am not a programming expert, I received your file and run it and it switches the Scope on. Could you be more specific as to where the problem lies, e.g. a line of code or the specific crash?
Here is a screen grab of the line that is failing. The pop up box which does not capture is headed
PInvokeStackImbalance was detected.
It then says
A call to PInvoke function 'PS5000test!WindowsApplication1.p5000library::ps5000GetTimebase' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature.
[DllImport("ps5000.dll"]
private static extern uint ps5000GetTimebase(
short handle,
uint timebase,
int noSamples,
out int timeIntervalNanoseconds,
short oversample,
out int maxSamples,
ushort segmentIndex);