Click here to Skip to main content
14,237,531 members

C / C++ / MFC

 
GeneralRe: Change value to a thread Pin
Victor Nijegorodov30-May-19 22:39
memberVictor Nijegorodov30-May-19 22:39 
GeneralRe: Change value to a thread Pin
_Flaviu30-May-19 23:57
member_Flaviu30-May-19 23:57 
GeneralRe: Change value to a thread Pin
Victor Nijegorodov31-May-19 0:01
memberVictor Nijegorodov31-May-19 0:01 
QuestionKnow when a files has been copied Pin
_Flaviu28-May-19 5:36
member_Flaviu28-May-19 5:36 
AnswerRe: Know when a files has been copied Pin
Richard MacCutchan28-May-19 5:50
protectorRichard MacCutchan28-May-19 5:50 
AnswerRe: Know when a files has been copied Pin
Victor Nijegorodov28-May-19 20:37
memberVictor Nijegorodov28-May-19 20:37 
AnswerRe: Know when a files has been copied Pin
Dave Kreskowiak31-May-19 2:49
mveDave Kreskowiak31-May-19 2:49 
QuestionI have 3rd party . OCX file. which loads in HTML scripts and do desired work Pin
Gaurav__Kapoor26-May-19 22:12
memberGaurav__Kapoor26-May-19 22:12 
I have 3rd party . OCX file. which loads in HTML scripts and do desired work

Below Steps I have used while creating a Wrapper:

1: In visual Studio-> VC++-CLR-ClassLibrary project
2: Project add Reference (.ocx file)
3: Ref: i am abe to see Interop.Filelib.1.0
4: now in Project.h i am trying to use Filelib but not able to create any object or instance.

While i tried to create an Activex project and added .ocx file getting below stuff and i am not able to understand how to use it and create an wrapper for C#. 

class CDNXCardReaderX : public CWnd
{
protected:
DECLARE_DYNCREATE(CDNXCardReaderX)
public:
CLSID const& GetClsid()
{
static CLSID const clsid
= { 0x222BBB5D, 0xE9FC, 0x4EB6, { 0x9E, 0xD0, 0x41, 0x10, 0x2C, 0x95, 0xC0, 0x3A } };
return clsid;
}
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle,
const RECT& rect, CWnd* pParentWnd, UINT nID, 
CCreateContext* pContext = NULL)
{ 
return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID); 
}

BOOL Create(LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, 
UINT nID, CFile* pPersist = NULL, BOOL bStorage = FALSE,
BSTR bstrLicKey = NULL)
{ 
return CreateControl(GetClsid(), lpszWindowName, dwStyle, rect, pParentWnd, nID,
pPersist, bStorage, bstrLicKey); 
}

// Attributes
public:

// Operations
public:

long OpenSessionSync(long Timeout)
{
long result;
static BYTE parms[] = VTS_I4 ;
InvokeHelper(0x2d, DISPATCH_METHOD, VT_I4, (void*)&result, parms, Timeout);
return result;
}


I am totally clueless on what approach shall i use to create object and call these functions.

AnswerRe: I have 3rd party . OCX file. which loads in HTML scripts and do desired work Pin
Richard MacCutchan26-May-19 22:35
protectorRichard MacCutchan26-May-19 22:35 
GeneralRe: I have 3rd party . OCX file. which loads in HTML scripts and do desired work Pin
Gaurav__Kapoor27-May-19 2:17
memberGaurav__Kapoor27-May-19 2:17 
GeneralRe: I have 3rd party . OCX file. which loads in HTML scripts and do desired work Pin
Richard MacCutchan27-May-19 3:40
protectorRichard MacCutchan27-May-19 3:40 
QuestionMessage Closed Pin
25-May-19 10:56
professionalMember 1437132725-May-19 10:56 
QuestionClever macro to handle consecutive addresses with built-in static_assert Pin
arnold_w24-May-19 22:54
memberarnold_w24-May-19 22:54 
AnswerRe: Clever macro to handle consecutive addresses with built-in static_assert Pin
Stefan_Lang26-May-19 22:15
memberStefan_Lang26-May-19 22:15 
Question"A rose by any other name would smell as sweet" - so what is the BEST name for "open_dev" function return? Pin
Vaclav_19-May-19 16:54
memberVaclav_19-May-19 16:54 
AnswerRe: "A rose by any other name would smell as sweet" - so what is the BEST name for "open_dev" function return? Pin
Richard MacCutchan19-May-19 21:28
protectorRichard MacCutchan19-May-19 21:28 
AnswerRe: "A rose by any other name would smell as sweet" - so what is the BEST name for "open_dev" function return? Pin
leon de boer20-May-19 3:01
memberleon de boer20-May-19 3:01 
AnswerRe: "A rose by any other name would smell as sweet" - so what is the BEST name for "open_dev" function return? Pin
jschell23-May-19 5:50
memberjschell23-May-19 5:50 
GeneralRe: "A rose by any other name would smell as sweet" - so what is the BEST name for "open_dev" function return? Pin
Daniel Pfeffer23-May-19 23:34
professionalDaniel Pfeffer23-May-19 23:34 
GeneralRe: "A rose by any other name would smell as sweet" - so what is the BEST name for "open_dev" function return? Pin
Peter_in_278024-May-19 0:17
professionalPeter_in_278024-May-19 0:17 
GeneralRe: "A rose by any other name would smell as sweet" - so what is the BEST name for "open_dev" function return? Pin
Daniel Pfeffer24-May-19 4:39
professionalDaniel Pfeffer24-May-19 4:39 
GeneralRe: "A rose by any other name would smell as sweet" - so what is the BEST name for "open_dev" function return? Pin
jschell2-Jun-19 8:26
memberjschell2-Jun-19 8:26 
GeneralRe: "A rose by any other name would smell as sweet" - so what is the BEST name for "open_dev" function return? Pin
Peter_in_278024-May-19 0:19
professionalPeter_in_278024-May-19 0:19 
QuestionVisual C++ 6.0 Release, but cannot get original Source Code Pin
Michael Hinton19-May-19 2:19
memberMichael Hinton19-May-19 2:19 
AnswerRe: Visual C++ 6.0 Release, but cannot get original Source Code Pin
phil.o19-May-19 2:28
mvephil.o19-May-19 2:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.