Jump to content

writing own footpedal driver , but no contact


icekiller

Recommended Posts

Hi

 

I am writing a pedaldrv.dll using the http://www.nch.com.au/scribe/pedaldrv.html

 

it seem to find the dll because it do lock the dll , but it do not call my entry ExpressScribePedalsOpen .

(did test using a logfile).

 

 

typedef void* HPEDALS;

 

#ifdef dotnet

__declspec(dllexport) HPEDALS ExpressScribePedalsOpen();

#else

extern "C" HPEDALS ExpressScribePedalsOpen();

#endif

 

neiter of this above do work.

 

 

I have no problem with calling the open in C# when using the __delc....

 

I am using the vs2008 c++ compiler on XP .

 

Best Regards

Kim

 

edit : have also tried

extern "C" {__declspec(dllexport) HPEDALS ExpressScribePedalsOpen(); }

and use of .h files

Link to comment
Share on other sites

I am writing a pedaldrv.dll using the http://www.nch.com.au/scribe/pedaldrv.html

 

it seem to find the dll because it do lock the dll , but it do not call my entry ExpressScribePedalsOpen.

That documentation appears to be out of date. Instead of ExpressScribePedalsOpen() / ExpressScribePedalsScan() / ExpressScribePedalsClose(), please rename your functions to match the following:

 

typedef void* HPEDALS;

#define ESPEDALS_RIGHT uint16_t(0x0001)
#define ESPEDALS_LEFT uint16_t(0x0002)
#define ESPEDALS_MID uint16_t(0x0004)
// Note: If supporting 2 pedals only use ESPEDALS_RIGHT and ESPEDALS_LEFT
// Note: If support 1 pedal only use ESPEDALS_LEFT

extern "C" HPEDALS CustomPedalsOpen();
// This is used to initialize data and connect to the pedals
// Should return NULL if pedals are not available or it fails.
// Returns an opaque 'handle'. Express Scribe just passes the same
// 'handle' value back to Scan and Close (below).

extern "C" uint16_t CustomPedalsScan(HPEDALS hPedals);
// Returns the or'd state of the pedals with the ESPEDALS_ constants above.
// Returns 0 on failure (or if no pedals pushed)

extern "C" void CustomPedalsClose(HPEDALS hPedals);
// This is used to close the connection to the pedals.
// Must not crash if NULL value is passed in hPedals.

Link to comment
Share on other sites

Hi

 

Thanks alot :D ,, that work perfect... ( did acutally allready try this names, found them in the .exe file , but I had made some mistakes).

 

Best regards

Kim

 

That documentation appears to be out of date. Instead of ExpressScribePedalsOpen() / ExpressScribePedalsScan() / ExpressScribePedalsClose(), please rename your functions to match the following:

 

typedef void* HPEDALS;

#define ESPEDALS_RIGHT uint16_t(0x0001)
#define ESPEDALS_LEFT uint16_t(0x0002)
#define ESPEDALS_MID uint16_t(0x0004)
// Note: If supporting 2 pedals only use ESPEDALS_RIGHT and ESPEDALS_LEFT
// Note: If support 1 pedal only use ESPEDALS_LEFT

extern "C" HPEDALS CustomPedalsOpen();
// This is used to initialize data and connect to the pedals
// Should return NULL if pedals are not available or it fails.
// Returns an opaque 'handle'. Express Scribe just passes the same
// 'handle' value back to Scan and Close (below).

extern "C" uint16_t CustomPedalsScan(HPEDALS hPedals);
// Returns the or'd state of the pedals with the ESPEDALS_ constants above.
// Returns 0 on failure (or if no pedals pushed)

extern "C" void CustomPedalsClose(HPEDALS hPedals);
// This is used to close the connection to the pedals.
// Must not crash if NULL value is passed in hPedals.

Link to comment
Share on other sites

Hi all,

very strange, I use ExpressScribe v 4.05 and I have to use ExpressScribePedalsOpen, etc. calls. They are called correctly, for example close/open when I enter/exit the configuration dialog. CustomPedalsOpen, etc. are never called...

Link to comment
Share on other sites

Hi all,

very strange, I use ExpressScribe v 4.05 and I have to use ExpressScribePedalsOpen, etc. calls. They are called correctly, for example close/open when I enter/exit the configuration dialog. CustomPedalsOpen, etc. are never called...

Hi,

solved the "problem": version 4.05 is out of date. I downloaded it a few days from then german site. The actual english version v.33 works fine with CustomPedalsOpen, etc. ...

Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...