Hi all,

I am using WinCE 5, for creating an settopbox. In the OAL I want to adjust
the OALArgsQuery(OAL_ARGS_QUERY_DEVID) so that the mac address of the device
is returned to the calling function. In this case OALIoCtlHalGetDeviceId( ),
this is needed for DRM to work.

In OALArgsQuery(OAL_ARGS_QUERY_DEVID), I use the
DeviceIOControl(OID_802_3_CURRENT_ADDRESS) to get the current mac address of
the device. The function DeviceIOControl uses Coredll.lib, so I link this
library in the source of kern.exe, but NK.lib is already linked here, and
there are dubble methodcalls in the library's so I use /FORCE:MULTIPLE. This
generates several warnings, but the image builds. But when I run the image,
it does nothing. It won't boot. So I have a couple of questions about that.

Q1) Is it possible to link the two library's in the same source? If so how?
Q2) Is there another way to retrieve the current mac address? I have already
tried GetAdaptersInfo, but that doesn't work either.

Michel van Geffen
Student at the Avans University of Professional Education

Re: Can't link nk.lib and coredll.lib in kern.exe by Paul

Paul
Tue Apr 29 08:59:50 PDT 2008

It doesn't make sense to link with coredll in the kernel, no. In CE6, the
architecture changes and if I'm thinking correctly, you should be able to do
that (you're actually linked to the kernel version of coredll.dll, in that
case).

I think that, for what you're talking about, you'll have to access the
hardware directly from the OAL and get the MAC address.

Paul T.

"Michel van Geffen" <MichelvanGeffen@discussions.microsoft.com> wrote in
message news:8A3824F5-B6FA-40C3-9C3C-3835205E6872@microsoft.com...
> Hi all,
>
> I am using WinCE 5, for creating an settopbox. In the OAL I want to adjust
> the OALArgsQuery(OAL_ARGS_QUERY_DEVID) so that the mac address of the
> device
> is returned to the calling function. In this case
> OALIoCtlHalGetDeviceId( ),
> this is needed for DRM to work.
>
> In OALArgsQuery(OAL_ARGS_QUERY_DEVID), I use the
> DeviceIOControl(OID_802_3_CURRENT_ADDRESS) to get the current mac address
> of
> the device. The function DeviceIOControl uses Coredll.lib, so I link this
> library in the source of kern.exe, but NK.lib is already linked here, and
> there are dubble methodcalls in the library's so I use /FORCE:MULTIPLE.
> This
> generates several warnings, but the image builds. But when I run the
> image,
> it does nothing. It won't boot. So I have a couple of questions about
> that.
>
> Q1) Is it possible to link the two library's in the same source? If so
> how?
> Q2) Is there another way to retrieve the current mac address? I have
> already
> tried GetAdaptersInfo, but that doesn't work either.
>
> Michel van Geffen
> Student at the Avans University of Professional Education



Re: Can't link nk.lib and coredll.lib in kern.exe by Dean

Dean
Tue Apr 29 10:48:51 PDT 2008

Doesn't work in CE6 either. The OAL can't be linked to coredll. Kernel
mode drivers (or any other module loaded into the kernel) can...
--
Dean Ramsier - eMVP
BSQUARE Corporation


"Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
com> wrote in message news:%23abDFIhqIHA.4492@TK2MSFTNGP02.phx.gbl...
> It doesn't make sense to link with coredll in the kernel, no. In CE6, the
> architecture changes and if I'm thinking correctly, you should be able to
> do that (you're actually linked to the kernel version of coredll.dll, in
> that case).
>
> I think that, for what you're talking about, you'll have to access the
> hardware directly from the OAL and get the MAC address.
>
> Paul T.
>
> "Michel van Geffen" <MichelvanGeffen@discussions.microsoft.com> wrote in
> message news:8A3824F5-B6FA-40C3-9C3C-3835205E6872@microsoft.com...
>> Hi all,
>>
>> I am using WinCE 5, for creating an settopbox. In the OAL I want to
>> adjust
>> the OALArgsQuery(OAL_ARGS_QUERY_DEVID) so that the mac address of the
>> device
>> is returned to the calling function. In this case
>> OALIoCtlHalGetDeviceId( ),
>> this is needed for DRM to work.
>>
>> In OALArgsQuery(OAL_ARGS_QUERY_DEVID), I use the
>> DeviceIOControl(OID_802_3_CURRENT_ADDRESS) to get the current mac address
>> of
>> the device. The function DeviceIOControl uses Coredll.lib, so I link this
>> library in the source of kern.exe, but NK.lib is already linked here, and
>> there are dubble methodcalls in the library's so I use /FORCE:MULTIPLE.
>> This
>> generates several warnings, but the image builds. But when I run the
>> image,
>> it does nothing. It won't boot. So I have a couple of questions about
>> that.
>>
>> Q1) Is it possible to link the two library's in the same source? If so
>> how?
>> Q2) Is there another way to retrieve the current mac address? I have
>> already
>> tried GetAdaptersInfo, but that doesn't work either.
>>
>> Michel van Geffen
>> Student at the Avans University of Professional Education
>
>



Re: Can't link nk.lib and coredll.lib in kern.exe by MichelvanGeffen

MichelvanGeffen
Tue Apr 29 10:59:01 PDT 2008

Sorry I ask, but I am kind of new in the programming business. But in regard
to what Paul said, how can I access the ethernet hardware directly to
retrieve the current mac address.

Kind regards,

Michel van Geffen
Student at the Avans University of Professional Education

"Dean Ramsier" wrote:

> Doesn't work in CE6 either. The OAL can't be linked to coredll. Kernel
> mode drivers (or any other module loaded into the kernel) can...
> --
> Dean Ramsier - eMVP
> BSQUARE Corporation
>
>
> "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam DOT
> com> wrote in message news:%23abDFIhqIHA.4492@TK2MSFTNGP02.phx.gbl...
> > It doesn't make sense to link with coredll in the kernel, no. In CE6, the
> > architecture changes and if I'm thinking correctly, you should be able to
> > do that (you're actually linked to the kernel version of coredll.dll, in
> > that case).
> >
> > I think that, for what you're talking about, you'll have to access the
> > hardware directly from the OAL and get the MAC address.
> >
> > Paul T.
> >
> > "Michel van Geffen" <MichelvanGeffen@discussions.microsoft.com> wrote in
> > message news:8A3824F5-B6FA-40C3-9C3C-3835205E6872@microsoft.com...
> >> Hi all,
> >>
> >> I am using WinCE 5, for creating an settopbox. In the OAL I want to
> >> adjust
> >> the OALArgsQuery(OAL_ARGS_QUERY_DEVID) so that the mac address of the
> >> device
> >> is returned to the calling function. In this case
> >> OALIoCtlHalGetDeviceId( ),
> >> this is needed for DRM to work.
> >>
> >> In OALArgsQuery(OAL_ARGS_QUERY_DEVID), I use the
> >> DeviceIOControl(OID_802_3_CURRENT_ADDRESS) to get the current mac address
> >> of
> >> the device. The function DeviceIOControl uses Coredll.lib, so I link this
> >> library in the source of kern.exe, but NK.lib is already linked here, and
> >> there are dubble methodcalls in the library's so I use /FORCE:MULTIPLE.
> >> This
> >> generates several warnings, but the image builds. But when I run the
> >> image,
> >> it does nothing. It won't boot. So I have a couple of questions about
> >> that.
> >>
> >> Q1) Is it possible to link the two library's in the same source? If so
> >> how?
> >> Q2) Is there another way to retrieve the current mac address? I have
> >> already
> >> tried GetAdaptersInfo, but that doesn't work either.
> >>
> >> Michel van Geffen
> >> Student at the Avans University of Professional Education
> >
> >
>
>
>

Re: Can't link nk.lib and coredll.lib in kern.exe by Paul

Paul
Tue Apr 29 11:06:02 PDT 2008

Wait a minute! You're new to programming and you're trying to modify an OAL
to get the Ethernet address of some connected hardware? Wrong early
project! Get someone who is not new to programming to help you in the
office with you.

Paul T.

"Michel van Geffen" <MichelvanGeffen@discussions.microsoft.com> wrote in
message news:42C51E17-B754-4FFD-80CC-C01D3048B8B1@microsoft.com...
> Sorry I ask, but I am kind of new in the programming business. But in
> regard
> to what Paul said, how can I access the ethernet hardware directly to
> retrieve the current mac address.
>
> Kind regards,
>
> Michel van Geffen
> Student at the Avans University of Professional Education
>
> "Dean Ramsier" wrote:
>
>> Doesn't work in CE6 either. The OAL can't be linked to coredll. Kernel
>> mode drivers (or any other module loaded into the kernel) can...
>> --
>> Dean Ramsier - eMVP
>> BSQUARE Corporation
>>
>>
>> "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
>> DOT
>> com> wrote in message news:%23abDFIhqIHA.4492@TK2MSFTNGP02.phx.gbl...
>> > It doesn't make sense to link with coredll in the kernel, no. In CE6,
>> > the
>> > architecture changes and if I'm thinking correctly, you should be able
>> > to
>> > do that (you're actually linked to the kernel version of coredll.dll,
>> > in
>> > that case).
>> >
>> > I think that, for what you're talking about, you'll have to access the
>> > hardware directly from the OAL and get the MAC address.
>> >
>> > Paul T.
>> >
>> > "Michel van Geffen" <MichelvanGeffen@discussions.microsoft.com> wrote
>> > in
>> > message news:8A3824F5-B6FA-40C3-9C3C-3835205E6872@microsoft.com...
>> >> Hi all,
>> >>
>> >> I am using WinCE 5, for creating an settopbox. In the OAL I want to
>> >> adjust
>> >> the OALArgsQuery(OAL_ARGS_QUERY_DEVID) so that the mac address of the
>> >> device
>> >> is returned to the calling function. In this case
>> >> OALIoCtlHalGetDeviceId( ),
>> >> this is needed for DRM to work.
>> >>
>> >> In OALArgsQuery(OAL_ARGS_QUERY_DEVID), I use the
>> >> DeviceIOControl(OID_802_3_CURRENT_ADDRESS) to get the current mac
>> >> address
>> >> of
>> >> the device. The function DeviceIOControl uses Coredll.lib, so I link
>> >> this
>> >> library in the source of kern.exe, but NK.lib is already linked here,
>> >> and
>> >> there are dubble methodcalls in the library's so I use
>> >> /FORCE:MULTIPLE.
>> >> This
>> >> generates several warnings, but the image builds. But when I run the
>> >> image,
>> >> it does nothing. It won't boot. So I have a couple of questions about
>> >> that.
>> >>
>> >> Q1) Is it possible to link the two library's in the same source? If so
>> >> how?
>> >> Q2) Is there another way to retrieve the current mac address? I have
>> >> already
>> >> tried GetAdaptersInfo, but that doesn't work either.
>> >>
>> >> Michel van Geffen
>> >> Student at the Avans University of Professional Education
>> >
>> >
>>
>>
>>



Re: Can't link nk.lib and coredll.lib in kern.exe by MichelvanGeffen

MichelvanGeffen
Tue Apr 29 11:32:03 PDT 2008

Hi Paul,

I am programming C++ and C for 5 years now, also worked on QNX and
microcontollers. But I am new to this kind of programming, in the OAL I mean.

But if you can give me some pointers on how to implement this, I can pass
this on to more experienced people in the firm.

Kind regards,

Michel van Geffen
Student at the Avans University of Professional Education

"Paul G. Tobey [eMVP]" wrote:

> Wait a minute! You're new to programming and you're trying to modify an OAL
> to get the Ethernet address of some connected hardware? Wrong early
> project! Get someone who is not new to programming to help you in the
> office with you.
>
> Paul T.
>
> "Michel van Geffen" <MichelvanGeffen@discussions.microsoft.com> wrote in
> message news:42C51E17-B754-4FFD-80CC-C01D3048B8B1@microsoft.com...
> > Sorry I ask, but I am kind of new in the programming business. But in
> > regard
> > to what Paul said, how can I access the ethernet hardware directly to
> > retrieve the current mac address.
> >
> > Kind regards,
> >
> > Michel van Geffen
> > Student at the Avans University of Professional Education
> >
> > "Dean Ramsier" wrote:
> >
> >> Doesn't work in CE6 either. The OAL can't be linked to coredll. Kernel
> >> mode drivers (or any other module loaded into the kernel) can...
> >> --
> >> Dean Ramsier - eMVP
> >> BSQUARE Corporation
> >>
> >>
> >> "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
> >> DOT
> >> com> wrote in message news:%23abDFIhqIHA.4492@TK2MSFTNGP02.phx.gbl...
> >> > It doesn't make sense to link with coredll in the kernel, no. In CE6,
> >> > the
> >> > architecture changes and if I'm thinking correctly, you should be able
> >> > to
> >> > do that (you're actually linked to the kernel version of coredll.dll,
> >> > in
> >> > that case).
> >> >
> >> > I think that, for what you're talking about, you'll have to access the
> >> > hardware directly from the OAL and get the MAC address.
> >> >
> >> > Paul T.
> >> >
> >> > "Michel van Geffen" <MichelvanGeffen@discussions.microsoft.com> wrote
> >> > in
> >> > message news:8A3824F5-B6FA-40C3-9C3C-3835205E6872@microsoft.com...
> >> >> Hi all,
> >> >>
> >> >> I am using WinCE 5, for creating an settopbox. In the OAL I want to
> >> >> adjust
> >> >> the OALArgsQuery(OAL_ARGS_QUERY_DEVID) so that the mac address of the
> >> >> device
> >> >> is returned to the calling function. In this case
> >> >> OALIoCtlHalGetDeviceId( ),
> >> >> this is needed for DRM to work.
> >> >>
> >> >> In OALArgsQuery(OAL_ARGS_QUERY_DEVID), I use the
> >> >> DeviceIOControl(OID_802_3_CURRENT_ADDRESS) to get the current mac
> >> >> address
> >> >> of
> >> >> the device. The function DeviceIOControl uses Coredll.lib, so I link
> >> >> this
> >> >> library in the source of kern.exe, but NK.lib is already linked here,
> >> >> and
> >> >> there are dubble methodcalls in the library's so I use
> >> >> /FORCE:MULTIPLE.
> >> >> This
> >> >> generates several warnings, but the image builds. But when I run the
> >> >> image,
> >> >> it does nothing. It won't boot. So I have a couple of questions about
> >> >> that.
> >> >>
> >> >> Q1) Is it possible to link the two library's in the same source? If so
> >> >> how?
> >> >> Q2) Is there another way to retrieve the current mac address? I have
> >> >> already
> >> >> tried GetAdaptersInfo, but that doesn't work either.
> >> >>
> >> >> Michel van Geffen
> >> >> Student at the Avans University of Professional Education
> >> >
> >> >
> >>
> >>
> >>
>
>
>

Re: Can't link nk.lib and coredll.lib in kern.exe by Paul

Paul
Tue Apr 29 12:23:00 PDT 2008

OK, that's no big deal. There's nothing conceptually difficult about the
OAL, but someone who's never done hardware before is sure to screw it up
badly.

Follow the examples for other hardware access in your OAL, so everything is
consistent. It might be just using a well-known address to access the
hardware. This might be something like 0xa0000000 + the physical address of
the hardware you need to talk to, but will depend on how your OEM address
table is set up.

DWORD *p = (DWORD*)(0xa0000000 + 0x00043210);
*p = ( *p & 0xff000000 ) | 0x008c9cac;

Might be the sort of thing you'd see. The OAL is probably assuming, if it
does something like this, that 0xa0000000 is the set of flags indicating
uncached, unbuffered addresses. The rest of the value is the physical
address of the I/O, which you'd get from the datasheet for the processor.
Obviously, then, the dereference of p is pointing to the register at the
indicated location and writing what we hope is a suitable value there to,
say, configure the secondary functions for a set of GPIO lines set up by the
low three bytes of the register.

It's also possible that the OAL has a set of macros to get to processor
registers, who knows.

Paul T.

"Michel van Geffen" <MichelvanGeffen@discussions.microsoft.com> wrote in
message news:5591F941-4CAA-4A29-89AE-8653EE50C90C@microsoft.com...
> Hi Paul,
>
> I am programming C++ and C for 5 years now, also worked on QNX and
> microcontollers. But I am new to this kind of programming, in the OAL I
> mean.
>
> But if you can give me some pointers on how to implement this, I can pass
> this on to more experienced people in the firm.
>
> Kind regards,
>
> Michel van Geffen
> Student at the Avans University of Professional Education
>
> "Paul G. Tobey [eMVP]" wrote:
>
>> Wait a minute! You're new to programming and you're trying to modify an
>> OAL
>> to get the Ethernet address of some connected hardware? Wrong early
>> project! Get someone who is not new to programming to help you in the
>> office with you.
>>
>> Paul T.
>>
>> "Michel van Geffen" <MichelvanGeffen@discussions.microsoft.com> wrote in
>> message news:42C51E17-B754-4FFD-80CC-C01D3048B8B1@microsoft.com...
>> > Sorry I ask, but I am kind of new in the programming business. But in
>> > regard
>> > to what Paul said, how can I access the ethernet hardware directly to
>> > retrieve the current mac address.
>> >
>> > Kind regards,
>> >
>> > Michel van Geffen
>> > Student at the Avans University of Professional Education
>> >
>> > "Dean Ramsier" wrote:
>> >
>> >> Doesn't work in CE6 either. The OAL can't be linked to coredll.
>> >> Kernel
>> >> mode drivers (or any other module loaded into the kernel) can...
>> >> --
>> >> Dean Ramsier - eMVP
>> >> BSQUARE Corporation
>> >>
>> >>
>> >> "Paul G. Tobey [eMVP]" <p space tobey no spam AT no instrument no spam
>> >> DOT
>> >> com> wrote in message news:%23abDFIhqIHA.4492@TK2MSFTNGP02.phx.gbl...
>> >> > It doesn't make sense to link with coredll in the kernel, no. In
>> >> > CE6,
>> >> > the
>> >> > architecture changes and if I'm thinking correctly, you should be
>> >> > able
>> >> > to
>> >> > do that (you're actually linked to the kernel version of
>> >> > coredll.dll,
>> >> > in
>> >> > that case).
>> >> >
>> >> > I think that, for what you're talking about, you'll have to access
>> >> > the
>> >> > hardware directly from the OAL and get the MAC address.
>> >> >
>> >> > Paul T.
>> >> >
>> >> > "Michel van Geffen" <MichelvanGeffen@discussions.microsoft.com>
>> >> > wrote
>> >> > in
>> >> > message news:8A3824F5-B6FA-40C3-9C3C-3835205E6872@microsoft.com...
>> >> >> Hi all,
>> >> >>
>> >> >> I am using WinCE 5, for creating an settopbox. In the OAL I want to
>> >> >> adjust
>> >> >> the OALArgsQuery(OAL_ARGS_QUERY_DEVID) so that the mac address of
>> >> >> the
>> >> >> device
>> >> >> is returned to the calling function. In this case
>> >> >> OALIoCtlHalGetDeviceId( ),
>> >> >> this is needed for DRM to work.
>> >> >>
>> >> >> In OALArgsQuery(OAL_ARGS_QUERY_DEVID), I use the
>> >> >> DeviceIOControl(OID_802_3_CURRENT_ADDRESS) to get the current mac
>> >> >> address
>> >> >> of
>> >> >> the device. The function DeviceIOControl uses Coredll.lib, so I
>> >> >> link
>> >> >> this
>> >> >> library in the source of kern.exe, but NK.lib is already linked
>> >> >> here,
>> >> >> and
>> >> >> there are dubble methodcalls in the library's so I use
>> >> >> /FORCE:MULTIPLE.
>> >> >> This
>> >> >> generates several warnings, but the image builds. But when I run
>> >> >> the
>> >> >> image,
>> >> >> it does nothing. It won't boot. So I have a couple of questions
>> >> >> about
>> >> >> that.
>> >> >>
>> >> >> Q1) Is it possible to link the two library's in the same source? If
>> >> >> so
>> >> >> how?
>> >> >> Q2) Is there another way to retrieve the current mac address? I
>> >> >> have
>> >> >> already
>> >> >> tried GetAdaptersInfo, but that doesn't work either.
>> >> >>
>> >> >> Michel van Geffen
>> >> >> Student at the Avans University of Professional Education
>> >> >
>> >> >
>> >>
>> >>
>> >>
>>
>>
>>