You can't load a kernel DLL from an application. It has to be a non-kernel
DLL. I think that simply removing SHK from your BIB entry will allow you to
load it as in 2 or link with the library. As for the link problem you're
having, there are several things that you might be doing wrong: the function
might not be exported from the DLL, hence not in the library, you might be
exporting it in C calling convention but trying to call it from C++ without
the declaration being properly set up (or you might be exporting it in C++
format and trying to call it as extern "C"), or you might be even further
off the track.
Paul T.
"vincent.tsai" <vincent.tsai@icnexus.com.tw> wrote in message
news:O2$e$N4XKHA.3504@TK2MSFTNGP05.phx.gbl...
> Hi:
>
> IN CE600,mipsii BSP platform ,i build a C AP project.
> i want to call a fuction defined in dll. this dll had been put in platform
> .bib (abc.dll $(_FLATRELEASEDIR)\abc.dll NK SHK)
> 1. could i call the function defined in dll directly in AP?
> 2. if i first to loadlibrary(TEXT("abc.dll")) then return NULL, how can i
> call the function defined in dll correctly?
> 3. i make the function to the BSP's lib. and put the lib to Application
> properties Link field (Additional libraries).
> but the link put out the err message:
> Linking obj\MIPSII\retail\BLK2.exe
> BUILD: [01:0000000048:ERRORE] BLK2.obj : error LNK2019: unresolved
> external symbol "int __cdecl GetBklVersion(unsigned short *)"
> (?GetBklVersion@@YAHPAG@Z) referenced in function "long __cdecl
> WndProc(struct HWND__ *,unsigned int,unsigned int,long)"
> (?WndProc@@YAJPAUHWND__@@IIJ@Z)
> BUILD: [01:0000000049:ERRORE] BLK2.obj : error LNK2019: unresolved
> external symbol "int __cdecl StartBklAPI(void)" (?StartBklAPI@@YAHXZ)
> referenced in function "long __cdecl WndProc(struct HWND__ *,unsigned
> int,unsigned int,long)" (?WndProc@@YAJPAUHWND__@@IIJ@Z)
> BUILD: [01:0000000050:ERRORE] obj\MIPSII\retail\BLK2.exe : fatal error
> LNK1120: 2 unresolved externals
>
> i had declared the function name as C rule.
> don't know why not link?
>
> hope to get clues .
> any comment would be good to us.
>
> Thanks & Best Regards.
> vincent tsai
>
>