Click here to Skip to main content
15,905,073 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
Questionhello, i have a question about char and int Pin
lxlenovostar29-Nov-10 0:22
lxlenovostar29-Nov-10 0:22 
AnswerRe: hello, i have a question about char and int Pin
Cool_Dev29-Nov-10 1:57
Cool_Dev29-Nov-10 1:57 
AnswerRe: hello, i have a question about char and int Pin
Richard MacCutchan29-Nov-10 3:40
mveRichard MacCutchan29-Nov-10 3:40 
Question[SOLVED] COM Dll Not Getting Registered In Windows Server 2008 [modified] Pin
MANISH RASTOGI26-Nov-10 18:20
MANISH RASTOGI26-Nov-10 18:20 
Questionrenaming files Pin
khomeyni20-Nov-10 7:46
khomeyni20-Nov-10 7:46 
AnswerRe: renaming files Pin
Cool_Dev20-Nov-10 21:12
Cool_Dev20-Nov-10 21:12 
GeneralRe: renaming files Pin
khomeyni20-Nov-10 23:48
khomeyni20-Nov-10 23:48 
GeneralRe: renaming files Pin
Richard MacCutchan21-Nov-10 1:15
mveRichard MacCutchan21-Nov-10 1:15 
GeneralRe: renaming files Pin
pasztorpisti2-Dec-10 6:11
pasztorpisti2-Dec-10 6:11 
AnswerRe: renaming files Pin
mbue9-Dec-10 15:28
mbue9-Dec-10 15:28 
GeneralRe: renaming files Pin
khomeyni10-Dec-10 4:26
khomeyni10-Dec-10 4:26 
QuestionHow to use WTL in dll? Pin
tank017-Nov-10 0:40
tank017-Nov-10 0:40 
AnswerRe: How to use WTL in dll? Pin
Alain Rist17-Nov-10 4:45
Alain Rist17-Nov-10 4:45 
GeneralRe: How to use WTL in dll? Pin
tank017-Nov-10 5:12
tank017-Nov-10 5:12 
GeneralRe: How to use WTL in dll? Pin
Alain Rist17-Nov-10 6:05
Alain Rist17-Nov-10 6:05 
GeneralRe: How to use WTL in dll? Pin
tank017-Nov-10 13:34
tank017-Nov-10 13:34 
GeneralRe: How to use WTL in dll? Pin
Alain Rist17-Nov-10 20:29
Alain Rist17-Nov-10 20:29 
QuestionOnQuit event of DWebBrowserEvents2 interface not called on IE8 on some Vista machin Pin
am 200916-Nov-10 17:04
am 200916-Nov-10 17:04 
AnswerRe: OnQuit event of DWebBrowserEvents2 interface not called on IE8 on some Vista machin Pin
KingsGambit18-Nov-10 19:37
KingsGambit18-Nov-10 19:37 
QuestionUsing WMI to Query for Currently Attached USB Device Pin
Jim Fell16-Nov-10 8:40
Jim Fell16-Nov-10 8:40 
QuestionCalling a com interface function ,but find a problem Pin
confideman200013-Nov-10 2:24
confideman200013-Nov-10 2:24 
one com interface function :

class IProtocolImp : public IUnknown
{

.....

GetRegisters( char *szDeviceName[int], LPVOID *ppReg[out] , int *pRegNum[out] );

// Get registers name and number

......

}

typedef struct reginfo
{
char sRegName[8];//register's name

int nLowIndex;
int nUpperIndex;

WORD wDataType;//

int nData;
}REG_INFO;

i call this in my project,

IProtocolImp * pf;

int RegNum;

REG_INFO * BASED_CODE pRegInfos[256];

HRESULT res=::CoCreateInstance(clsid,NULL,CLSCTX_INPROC_SERVER,IID_ProtocolImp,(void * *)&pf);

if(res == S_OK)

{

pf->GetRegisters("MyDevice",(LPVOID *)pRegInfos,&RegNum);

}

if program is correct,will return

RegNum=2;

gsRegInfos[0]={"DATA1", 0, 15, 100, 0};gsRegInfos[1]={"DATA2", 0, 15, 100,0};

but program has a problem,

RegNum=2;//this correct

gsRegInfos[0]={"DATA1", 0, 15, 100, 0};gsRegInfos[1]=0xcccccccc;//this a problem

why ????

it is com code:

"xxx.h"

static REG_INFO BASED_CODE gsRegInfos[]=
{
{"DATA1", 0, 15, 100, 0};

{"DATA2", 0, 15, 100, 0};

};

"xxx.cpp"

STDMETHODIMP_(BOOL) MYDLLPro::XProtocolImp::GetRegisters(char *szDeviceName,LPVOID * ppRegs, int *pRegNum)
{
METHOD_PROLOGUE(MYDLLPro, ProtocolImp);
*ppRegs = (LPVOID)&gsRegInfos;
*pRegNum = sizeof(gsRegInfos)/sizeof REG_INFO;//REG_TYPE_NUM

return TRUE;
}
AnswerRe: Calling a com interface function ,but find a problem Pin
Richard MacCutchan13-Nov-10 5:51
mveRichard MacCutchan13-Nov-10 5:51 
AnswerRe: Calling a com interface function ,but find a problem Pin
Stephen Hewitt13-Nov-10 18:14
Stephen Hewitt13-Nov-10 18:14 
Questionhello i have a problem with linux Pin
lxlenovostar11-Nov-10 15:19
lxlenovostar11-Nov-10 15:19 
AnswerRe: hello i have a problem with linux Pin
Dr.Walt Fair, PE11-Nov-10 17:10
professionalDr.Walt Fair, PE11-Nov-10 17:10 

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.