描述:
如果我不加上 raw_interfaces_only,就会出现下面的错误
d:\ohahu\vccode\comscr\debug\scrrun.tlh(447) : warning C4003: not enough actual parameters for macro 'GetFreeSpace'
d:\ohahu\vccode\comscr\debug\scrrun.tlh(447) : error C2629: unexpected 'class _variant_t ('
d:\ohahu\vccode\comscr\debug\scrrun.tlh(447) : error C2238: unexpected token(s) preceding ';'
d:\ohahu\vccode\comscr\debug\scrrun.tli(357) : warning C4003: not enough actual parameters for macro 'GetFreeSpace'
d:\ohahu\vccode\comscr\debug\scrrun.tli(357) : error C2589: '(' : illegal token on right side of '::'
d:\ohahu\vccode\comscr\debug\scrrun.tli(357) : warning C4091: 'inline ' : ignored on left of 'class _variant_t' when no variable is declared
d:\ohahu\vccode\comscr\debug\scrrun.tli(357) : error C2143: syntax error : missing ';' before '::'
d:\ohahu\vccode\comscr\debug\scrrun.tli(357) : error C2059: syntax error : '::'
d:\ohahu\vccode\comscr\debug\scrrun.tli(357) : error C2143: syntax error : missing ';' before '{'
d:\ohahu\vccode\comscr\debug\scrrun.tli(357) : error C2447: missing function header (old-style formal list?)
Error executing cl.exe.
不用 raw_interfaces_only的话,用rename也不行,也不知道这样可不可以用rename("GetFreeSpace","GetFSpace")
另外IDriveCollectionPtr已经获得了,怎么样通过
virtual HRESULT __stdcall get_Item (
VARIANT Key,
struct IDrive * * ppdrive ) = 0;
来获的(raw_interfaces_only只能用这个函数了)
下面这样做的到的DrivePtr为NULL
VARIANT var;
var.vt=VT_I2;
var.lVal=(long)i;
DrivesPtr->get_Item(var,&DrivePtr);