QUOTE(jibpek @ Feb 29 2024, 07:34 AM)
First find out if their DLL is COM or ActiveX, or pure C++ DLL with Header file?
Since DirectX era, all video and audio capturing or output devices had already been standardized. Very seldom find proprietary devices anymore.
And because of the high throughput rate, video / audio i/o using DMA is a norm.
dont really matter what it is, in order to make use of the dll, we need to understand how to call and pass in, its not just basic variables (integer, etc) need to pass in, but need very complex structure to be passed in, like memory address that has been allocated, callback function(that will be called when capture is done, will happen like 60 times per second, per input), handles of program itself, etc into the structure, 1 wrong param, program will just crash, and hardware(card) might stop functioning, need to reboot.
its a professional capture card, not consumer level, mainly used in control room or medical, i dont want to go down that path.
this is 1 of the "structure" i need to figure out their values when running in c, if any of those values are wrong, like 32bit integer in c is 64bit unsigned long in c#, then ill be in trouble, cause dll read them in raw, directly reading bits in the memory, no auto conversion
CODE
typedef struct {
/* Thread parms */
HANDLE HThread;
HANDLE HStartEvent;
DWORD DWThreadID;
HRESULT Error;
/* External parms */
ULONG Input;
/* Internal parms */
BOOL BClose;
HAUDIO HAudio;
#if AUDIO_WAIT_FOR_DATA
HANDLE HBitsInList;
#endif
ULONG FormatCount;
ULONG FormatIndex;
PAUDIOCAPS PFormats;
WAVEFORMATEXTENSIBLE WaveEx;
REFERENCE_TIME BufferDuration;
ULONG BufferSize;
AUDIOCAPTURESTATE State;
ULONG Event;
} AUDIOPARMS, *PAUDIOPARMS;
This post has been edited by narf03: Feb 29 2024, 02:52 PM