the linker can't find DeviceIOControl().
I checked coredll.dll with dumpbin and it is there.
I can link with ReadFile()/WriteFile() fine.

Am I missing anything else?


void olSetBits(unsigned int BitsToSet)
{
DWORD BytesWritten;
//WriteFile(hMLT, &BitsToSet, 2, &BytesWritten, NULL);
DeviceIOControl(hMLT, IOCTL_MLT_SETBITS, &BitsToSet, 2, NULL, 0,
&BytesWritten, NULL); //only write these bits
}


sources file:
TARGETNAME=xrtc
RELEASETYPE=PLATFORM
TARGETTYPE=DYNLINK

TARGETLIBS= \
$(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \
$(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib \

SOURCELIBS= \


DEFFILE=xrtc.def

PREPROCESSDEFFILE=1

DLLENTRY=XRC_DllEntry

SOURCES=xrtc.c \
rtcx.c

Re: link problem with DeviceIOControl in driver by Bruce

Bruce
Tue Mar 06 11:26:22 CST 2007

lower case 'o'

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

"swc" <news.10.swc@spamgourmet.com> wrote in message
news:e3Lgu%23AYHHA.3256@TK2MSFTNGP04.phx.gbl...
> the linker can't find DeviceIOControl().
> I checked coredll.dll with dumpbin and it is there.
> I can link with ReadFile()/WriteFile() fine.
>
> Am I missing anything else?
>
>
> void olSetBits(unsigned int BitsToSet)
> {
> DWORD BytesWritten;
> //WriteFile(hMLT, &BitsToSet, 2, &BytesWritten, NULL);
> DeviceIOControl(hMLT, IOCTL_MLT_SETBITS, &BitsToSet, 2, NULL, 0,
> &BytesWritten, NULL); //only write these bits
> }
>
>
> sources file:
> TARGETNAME=xrtc
> RELEASETYPE=PLATFORM
> TARGETTYPE=DYNLINK
>
> TARGETLIBS= \
> $(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \
> $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib \
>
> SOURCELIBS= \
>
>
> DEFFILE=xrtc.def
>
> PREPROCESSDEFFILE=1
>
> DLLENTRY=XRC_DllEntry
>
> SOURCES=xrtc.c \
> rtcx.c
>
>
>



Re: link problem with DeviceIOControl in driver by swc

swc
Tue Mar 06 12:05:28 CST 2007

Thanks, I can't believe I missed that.

"Bruce Eitman [eMVP]" <beitman.nospam@applieddata.net.nospam> wrote in
message news:ePAvgSBYHHA.992@TK2MSFTNGP02.phx.gbl...
> lower case 'o'
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> beitman AT applieddata DOT net
>
> Applied Data Systems
> www.applieddata.net
> An ISO 9001:2000 Registered Company
> Microsoft WEP Gold-level Member
>
> "swc" <news.10.swc@spamgourmet.com> wrote in message
> news:e3Lgu%23AYHHA.3256@TK2MSFTNGP04.phx.gbl...
>> the linker can't find DeviceIOControl().
>> I checked coredll.dll with dumpbin and it is there.
>> I can link with ReadFile()/WriteFile() fine.
>>
>> Am I missing anything else?
>>
>>
>> void olSetBits(unsigned int BitsToSet)
>> {
>> DWORD BytesWritten;
>> //WriteFile(hMLT, &BitsToSet, 2, &BytesWritten, NULL);
>> DeviceIOControl(hMLT, IOCTL_MLT_SETBITS, &BitsToSet, 2, NULL, 0,
>> &BytesWritten, NULL); //only write these bits
>> }
>>
>>
>> sources file:
>> TARGETNAME=xrtc
>> RELEASETYPE=PLATFORM
>> TARGETTYPE=DYNLINK
>>
>> TARGETLIBS= \
>> $(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \
>> $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib \
>>
>> SOURCELIBS= \
>>
>>
>> DEFFILE=xrtc.def
>>
>> PREPROCESSDEFFILE=1
>>
>> DLLENTRY=XRC_DllEntry
>>
>> SOURCES=xrtc.c \
>> rtcx.c
>>
>>
>>
>
>



Re: link problem with DeviceIOControl in driver by Bruce

Bruce
Tue Mar 06 14:55:41 CST 2007

It happens.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

"swc" <news.10.swc@spamgourmet.com> wrote in message
news:ORlPIoBYHHA.2636@TK2MSFTNGP06.phx.gbl...
> Thanks, I can't believe I missed that.
>
> "Bruce Eitman [eMVP]" <beitman.nospam@applieddata.net.nospam> wrote in
> message news:ePAvgSBYHHA.992@TK2MSFTNGP02.phx.gbl...
>> lower case 'o'
>>
>> --
>> Bruce Eitman (eMVP)
>> Senior Engineer
>> beitman AT applieddata DOT net
>>
>> Applied Data Systems
>> www.applieddata.net
>> An ISO 9001:2000 Registered Company
>> Microsoft WEP Gold-level Member
>>
>> "swc" <news.10.swc@spamgourmet.com> wrote in message
>> news:e3Lgu%23AYHHA.3256@TK2MSFTNGP04.phx.gbl...
>>> the linker can't find DeviceIOControl().
>>> I checked coredll.dll with dumpbin and it is there.
>>> I can link with ReadFile()/WriteFile() fine.
>>>
>>> Am I missing anything else?
>>>
>>>
>>> void olSetBits(unsigned int BitsToSet)
>>> {
>>> DWORD BytesWritten;
>>> //WriteFile(hMLT, &BitsToSet, 2, &BytesWritten, NULL);
>>> DeviceIOControl(hMLT, IOCTL_MLT_SETBITS, &BitsToSet, 2, NULL, 0,
>>> &BytesWritten, NULL); //only write these bits
>>> }
>>>
>>>
>>> sources file:
>>> TARGETNAME=xrtc
>>> RELEASETYPE=PLATFORM
>>> TARGETTYPE=DYNLINK
>>>
>>> TARGETLIBS= \
>>> $(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \
>>> $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\ceddk.lib \
>>>
>>> SOURCELIBS= \
>>>
>>>
>>> DEFFILE=xrtc.def
>>>
>>> PREPROCESSDEFFILE=1
>>>
>>> DLLENTRY=XRC_DllEntry
>>>
>>> SOURCES=xrtc.c \
>>> rtcx.c
>>>
>>>
>>>
>>
>>
>
>