Click here to Skip to main content
15,885,914 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have Created ATL Project in VS2010.
I am having my ATL Control.
I have added Method given below.

Code in IDL File:
[id(1)] HRESULT GetInput([in] LONG* lnInput);

Code in Header File:
STDMETHOD(GetInput)(LONG* lnInput);

Code in CPP File:
STDMETHODIMP CATLSampleCtrl::GetInput(LONG* lnInput)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
CString s1, s2;
for(int i = 0; i < 5; i++)
{
s2.Format(_T("%d\n"),lnInput[i]);
s1 += s2;
}
AfxMessageBox(s1);
return S_OK;
}


I want to pass input array from VB Sample having 5 values.
It is giving me "Data Type Mismatch" Error Message.
Posted
Comments
Sergey Alexandrovich Kryukov 12-Feb-14 1:56am    
In what line?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900