Knowledgebase: Integrating Pamela
How to integrate Pamela's functions seamless into your own application with the Remote Control DLL

As of Pamela 3 we have added a DLL that allows you to remote control various settings in Pamela and start/stop events.

If you have an application and wish to use functions in Pamela you can do that remotely now via a DLL.

Note that the remote control DLL Is only available in Pamela Professional and Business. This decision was made to keep the file size of Pamela Basic small. The DLL is called "remotecontrol.dll" and is available in the SYSDIR directory.


Available commands in the DLL are:

Attach remote application to Pamela API

int RemoteControlAttach(HWND a_requester);

a_requester: window handle of the requester

Detach remote application from Pamela API

int RemoteControlDetach(HWND a_requester, int a_forceBringToTop);

a_requester: window handle of the requester
a_forceBringToTop: 0/1, bring Pamela window to top on detach

Check connection of the requester to Pamela API

int RemoteControlCheck(HWND a_requester);

a_requester: window handle of the requester

Update Pamela string option

int SetOptionString(LPCTSTR a_optionID, LPCTSTR a_optionValue);

a_optionID: option name (see pamela settings.xml for names)
a_optionValue: option value

Obtain Pamela string option value

int GetOptionString(LPCTSTR a_optionID, LPCTSTR a_optionValue, int a_maxLen);

a_optionID: option name (see pamela settings.xml for names)
a_optionValue: allocated buffer to save option value to
a_maxLen: buffer length

Update Pamela numeric option

int SetOptionInt(LPCTSTR a_optionID, int a_optionValue);

a_optionID: option name (see Pamela settings.xml for names)
a_optionValue: option value

Obtain Pamela numeric option value

int GetOptionInt(LPCTSTR a_optionID);

a_optionID: option name (see Pamela settings.xml for names)

Set Pamela application to hidden mode (suitable for Windows XP, because in Windows7 there is no way to hide the taskbar icon) int StartTrayMode();
Set Pamela to normal mode from hidden mode

int StopTrayMode(int a_forceBringToTop);

a_forceBringToTop: 0/1, bring Pamela window to top on back to normal mode

Show Pamela Tray icon (suitable for Windows XP because in Windows7 and Windows8 TrayBar area mostly not used) int ShowTrayIcon(void);
Hide Pamela Tray icon (suitable for Windows XP because in Windows7 and Windows8 TrayBar area mostly not used) int HideTrayIcon(void);
Start call recording int StartCallRecording();
Stop call recoring int StopCallRecording();
Pause call recording int PauseCallRecording();
Resume call recording int ResumeCallRecording();
Accept inbound ringing call int AcceptSkypeCall(void);
Return call to Skype processing from Pamela voicemail mode int ReturnSkypeCall(void);
Reject inbound call in Skype int RejectSkypeCall(void);
Hangup established calls int FinishSkypeCall(void);
Open Pamela CallTransfer window int TransferSkypeCall(void);
Open Pamela Emotions Player window int OpenEmotionsPlayer(void);
Open Pamela Active Call notes editor window int OpenNotesEditor(void);
Open Pamela main window int ShowMainWindow(void);
Show Pamela registration window int RLocal(void);
Obtain Pamela registration status:
0 - Registered
>0 - regsitration error (error code)
<0 - trial days left
int GetRegistrationStatus(void);
Obtain number of trial days left in case of unregistered state int GetTrialDays(void);

Return codes

There are two codes Pamela returns.

1 - Means that Pamela is loaded, attachments possible, current attached handle validated and attached to remote control. All further remote operations possible.

0 - Attachment failed.

A zero for anything else means failed too. Excluded is the command "GetOptionInt" because this option can be set to 0.

 

Sample Code

Attached you will find C++ (VS2012) sample code which will allow you to see how to work with the dll.



Attachments 
 
 c++remotecontroldemo.zip (347.60 KB)
(725 vote(s))
This article was helpful
This article was not helpful