- Oney's spinlock sample code.
- Posted by Sergio on September 20th, 2004
I tryed to compile the spinlock sample code of the Oney's book with .NET.
2002 and with Whidbey C++ Express
The compiler complains though:
DriverEntry.obj : error LNK2019: unresolved external symbol
@__security_check_cookie@4 referenced in function "long __stdcall
AddDevice(struct _DRIVER_OBJECT *,struct _DEVICE_OBJECT *)"
(?AddDevice@@YGJPAU_DRIVER_OBJECT@@PAU_DEVICE_OBJE CT@@@Z)
objchk_wxp_x86\i386\spinlock.sys : fatal error LNK1120: 1 unresolved
externals
I'd be grateful if You could explain me.
Regards.
- Posted by nospam@cristalink.com on September 20th, 2004
If you don't know how to fix linker errors, you should use the standard
Build utility, compiler and linker that come with DDK. C++ in Windows kernel
drivers is not for newbies.
"Sergio" <sorrowforsorrow@yahoo.com> wrote in message
news:OMl2WY1nEHA.3564@tk2msftngp13.phx.gbl...
- Posted by nospam@cristalink.com on September 20th, 2004
Try to remove Basic runtime checks and Buffer security check in your project
settings.
"nospam@cristalink.com" <cristalink@nospam.nospam> wrote in message
news:ORI5G91nEHA.1296@TK2MSFTNGP09.phx.gbl...
- Posted by Sergio on September 20th, 2004
I tryed to follow Your advice, but, unfortunately, it doesn't work on .NET
C++ Express Whidbey
Where does the "security_check_cookie" symbol originate from?
Thank You, anyway.
"nospam@cristalink.com" <cristalink@nospam.nospam> wrote in message
news:O3Dwl$1nEHA.1644@tk2msftngp13.phx.gbl...
- Posted by Maxim S. Shatskih on September 21st, 2004
It is better to save the time by moving from Whidbey's compiler to the
DDK's one, instead of trying to solve the nonexisting issues.
Whidbey is a good text editor though.
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com
"Sergio" <sorrowforsorrow@yahoo.com> wrote in message
news:OMl2WY1nEHA.3564@tk2msftngp13.phx.gbl...
- Posted by nospam@cristalink.com on September 21st, 2004
I haven't use Express before and hopefully won't in the future.
security_check_cookie checks buffer overflows or something, if I am not
wrong. Quite possible it's not disableable in Express. If you have DDK then
you should use DDK's build utility, not Whidbey. If you don't have DDK then
you won't be able to compile the sample anyway.
"Sergio" <sorrowforsorrow@yahoo.com> wrote in message
news:uVWn6s2nEHA.1304@TK2MSFTNGP09.phx.gbl...
- Posted by Sergio on September 21st, 2004
I have the DDK 3
The Oney's code compiles with the ddk 3 build utility.
My system is Windows XP sp 2.
I'd like to use .NET cause with the Intellisense editing and typing are
easy.
I'll try for a while with .NET 2002.
Thanks for Your advice.
"nospam@cristalink.com" <cristalink@nospam.nospam> wrote in message
news:eRQRJF3nEHA.3396@tk2msftngp13.phx.gbl...
- Posted by Chris on September 21st, 2004
Assuming you can create makefile projects with C++ Express, get DDKBUILD.
"Sergio" <sorrowforsorrow@yahoo.com> wrote in message
news:uKRFGS3nEHA.2764@TK2MSFTNGP11.phx.gbl...
- Posted by Kiran on September 22nd, 2004
If you have added DDK Lib path as additional library paths in .NET, that is
the culprit. Remove that path and copy the required libs to SDK lib directory.
-Kiran
"Sergio" wrote:
- Posted by Sergio on September 22nd, 2004
Sorry, it doesn't work.
Thank You, everyone.
"Chris" <cdore.connecttech.com> wrote in message
news:%23BYzoWAoEHA.3464@tk2msftngp13.phx.gbl...
- Posted by Mark Roddy on September 22nd, 2004
In article <eZK3TVJoEHA.3876@TK2MSFTNGP15.phx.gbl>,
sorrowforsorrow@yahoo.com says...
Exactly what doesn't work? DDKBUILD, as in ddkbuild.bat from my website,
www.hollistech.com, ought to work just fine. You should be able to use
VS any version, as long as it supports 'external makefile' projects.
--
=====================
Mark Roddy DDK MVP
Windows 2003/XP/2000 Consulting
Hollis Technology Solutions 603-321-1032
www.hollistech.com
markr@hollistech.com
- Posted by Walter Oney on September 22nd, 2004
Sergio wrote:
Nearly all of my samples have SOURCES files for use with the standard
BUILD utility in the DDK. I just this instant ran the XP checked build
in the 3790 DDK on the SPINLOCK sample, and it worked without error. You
should be able to use Mark's DDKBUILD to launch BUILD from within any
IDE. Just define the project to use an external makefile, and specify
DDKBUILD as the command to execute. You may have to diddle the PATH
environment a bit to make sure that DDKBUILD executes correctly, but
that's the sort of bump in the road that driver programmers have to
learn to overcome.
--
Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Check out our schedule at http://www.oneysoft.com
- Posted by Sergio on September 22nd, 2004
Thank You.
"Walter Oney" <waltoney@oneysoft.com> wrote in message
news:41517C4B.6862254E@oneysoft.com...
- Posted by Chris on September 22nd, 2004
I don't understand why you should have to copy files around. Mixing all the
DDK and SDK inc/libs into one pot sounds like a bad idea to me.
Why can't you just add the DDK lib/inc paths _above_ the default VS paths in
order to give them priority.
Chris
"Kiran" <Kiran@discussions.microsoft.com> wrote in message
news:A6C675B7-AE66-4131-8607-0BEBFC2BF700@microsoft.com...