build dll from windows application.

G

Guest

Hi
I have a C++ windows program for control camera by computer(canon camera
wrapper). this including some of windows and dialog.
I wish summerize this code to requirement functions and build it into a dll
file.

some of my original code is:

class CRelCtrlDlg : public CDialog
{
// Construction
public:
CRelCtrlDlg(CWnd* pParent = NULL); // standard constructor

// Dialog Data
//{{AFX_DATA(CRelCtrlDlg)
enum { IDD = IDD_RELCTRL_DIALOG };
CStatic m_Static_ShootingMode;
.......

};

and

prResponse prSTDCALL CRelCtrlDlg::ViewFinderCallBackFun(prHandle
CameraHandle, prContext Context, prUInt32 Size, prVoid* pEventData)
{
CRelCtrlDlg *CpThis;

CpThis = (CRelCtrlDlg*)Context;

CpThis->m_CVFMutex.Lock();

CpThis->m_VF_DataSize = Size;

};

howe can i translate this code?
very thanks.
 
G

Guest

I have a C++ windows program for control camera by computer(canon camera
wrapper). this including some of windows and dialog.
I wish summerize this code to requirement functions and build it into a dll
file.

some of my original code is:

Hi,

First of all, this is not your code. This is the source code of the sample
that is distributed with the Canon PRecSDK.
apart from the practical matter of converting it to a dll, this code only
works if you include all the classes of the sample code in your dll project.
Do you have permission to use that code for commercial purposes?

And those classes do nothing but call the C style SDK functions that are
well documented.

I would advise you to create a new dll project, find out which SDK functions
you need to call in which order, and then simply call those functions from
within your exported functions. For information on how to create a dll, look
on www.codeproject.com

If you use the code from the sample program, you are using code that
a) you don't own
b) you don't understand
c) was not designed to be of production quality.
d) adds unnecessary complexity to your dll project.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top