I am just starting to use the Winsock Kernel routines for the first
time.
I compile a trivial file, I have lots to add.
=============
#include <ntddk.h>
#include <wsk.h>
WSK_REGISTRATION WskRegistration;
const WSK_CLIENT_DISPATCH WskAppDispatch =
{
MAKE_WSK_VERSION(1,0),
0,
NULL
};
NTSTATUS RegisterSocketClient()
{
WSK_CLIENT_NPI wskClientNPI;
NTSTATUS Status;
wskClientNPI.ClientContext = NULL;
wskClientNPI.Dispatch = &WskAppDispatch;
Status = WskRegister(&wskClientNPI, &WskRegistration);
return Status;
}
void DeregisterSocketClient()
{
WskDeregister(&WskRegistration);
}
=================
The .c compiles as expected but the linker does not find the functions
c:\myfile.obj : error LNK2019: unresolved external symbol
xxxxx@8 referenced in function _RegisterSocketClient@0
c:\myfile.obj : error LNK2019: unresolved external symbol
xxxxx@4 referenced in function _DeregisterSocketClient@0
I am compiling on XP forVista (only) using WDK 6000
Is there something I need to add to my sources file?
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
</wsk.h></ntddk.h>
Add the following to TARGETLIBS in the sources file
$(SDK_LIB_PATH)\netio.lib
-Preston
On 1/31/07 4:49 AM, “Ian Blake” wrote:
> I am just starting to use the Winsock Kernel routines for the first
> time.
>
> I compile a trivial file, I have lots to add.
>
> …
> The .c compiles as expected but the linker does not find the functions
>
> c:\myfile.obj : error LNK2019: unresolved external symbol
> xxxxx@8 referenced in function _RegisterSocketClient@0
> c:\myfile.obj : error LNK2019: unresolved external symbol
> xxxxx@4 referenced in function _DeregisterSocketClient@0
>
> I am compiling on XP forVista (only) using WDK 6000
>
> Is there something I need to add to my sources file?
>
Quoting Preston Wilson :
> Add the following to TARGETLIBS in the sources file
> $(SDK_LIB_PATH)\netio.lib
>
> -Preston
>
>
Thanks.
Although I think DDK_LIB_PATH is the one I should use.
>> Add the following to TARGETLIBS in the sources file
> $(SDK_LIB_PATH)\netio.lib
Although I think DDK_LIB_PATH is the one I should use.
I agree. Something to fix on my end, as I copied that out of a sources file.
Thanks,
-Preston
xxxxx@dsl.pipex.com wrote:
Quoting Preston Wilson :
>
>> Add the following to TARGETLIBS in the sources file
>> $(SDK_LIB_PATH)\netio.lib
>
> Thanks.
> Although I think DDK_LIB_PATH is the one I should use.
>
Pick whichever one you like. In the 6000 WDK, both symbols point to the
same place, and netio.lib isn’t present in earlier versions.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.