Hi all,
I am currently playing with the Bluesoleil Bluetooth Stack SDK and I have got stuck with registering callbacks..
I only know some Vb.net but they provide a DLL which exports the SDK functions - I have used DLLImport to access some of these but I'm unsure how to do the callbacks.
Some info from the SDK Guide regarding the callback function;
They have provided a sample of this function in C++ I believe;Code:Btsdk_RegisterCallback4ThirdParty Prototype BTINT32 Btsdk_RegisterCallback4ThirdParty ( PbtSdkCallbackStru call_back ); Description The Btsdk_RegisterCallback4ThirdParty function registers an application-defined callback function. Parameters call_back [in] Pointer to a BtSdkCallbackStru structure that contains information about the callback function to be registered. Return: If the function succeeds, the return value is BTSDK_OK. If the function fails, the return value is an error code listed in Table 1.
Would anybody be able to give me an example of how to correct call that function in the DLL from Vb.net, so that I can register the callbacks in my application?Code:/* This sample demonstrates how to register a callback to process inquiry result indication. */ void AppInquiryResultInd(BTDEVHDL dev_hdl) { /* Process the Indication. */ } void AppRegisterCallback(void) { BtSdkCallbackStru cb; cb.type = BTSDK_INQUIRY_RESULT_IND; cb.func = (PVOID) AppInquiryResultInd; Btsdk_RegisterCallback4ThirdParty (&cb); }
I have done quite a bit of searching this morning but I'm more confused than when I started!
A working example that I could then apply to some of the other functions would help me immensly!
Many Thanks




Reply With Quote