::CreateFile
…and you’ll be opening “\\.\sss”
BR,
Rob Linegar
Software Engineer
Data Encryption Systems Limited
www.des.co.uk | www.deslock.com
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of shiva
Sent: 19 December 2006 09:41
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] program for symbolic link
but i am getting how can we call from application program this symbolic
link.
that means by which funtion we can call this, and how can we check
whether this is success or failure,
i wrote code using iocreatesymboliclink in driver but how to call my
device object from application
here i am giving u the code which i modified in filter.c of usb
RtlInitUnicodeString(&devName,L"\Device\ssss");
RtlInitUnicodeString(&symbolicLinkName, SYMBOLIC_NAME_STRING);
/*ends my code*/
status = IoCreateDevice( driverObj,
sizeof(struct DEVICE_EXTENSION),
&devName, // name for this
device
FILE_DEVICE_UNKNOWN,
FILE_AUTOGENERATED_DEVICE_NAME,
// device characteristics
FALSE, // not exclusive
&filterDevObj); // our device object
//
// It is important that you choose correctly the file type for this
// device object. Here we use FILE_DEVICE_UNKNOWN because this is
// a generic filter, however as will all filters, the creator needs
// to understand to which stack this filter is attaching.
// E.G. if you are writing a CD filter driver you need to use
// FILE_DEVICE_CD_ROM. IoCreateDevice actually creates device
object
// with different properties dependent on this field.
//
if (NT_SUCCESS(status)){
struct DEVICE_EXTENSION *devExt;
ASSERT(filterDevObj);
/*my code starts*/
// Point uszDeviceString at the device name
// Create symbolic link to the user-visible name
ntStatus = IoCreateSymbolicLink(&symbolicLinkName,
&devName);
/* my code ens*/
can u please help me out how to load this driver using inf file and can
i use the same inf file which is there in usb filter.
in inf file i am using the hardware id as
%USB\VID_045E&PID_0014.DeviceDesc%=QV2KUX,USB\VID_045E&PID_0014
using this how can load and how can verify this symbolic link is created
or not
i need application which is calling this symbolic link
thanks and regards
shiva
Tim Roberts wrote:
xxxxx@yahoo.co.in wrote:
> i want to create a link between the user mode application to
the kernel mode driver i.e making symboliclink between the application
and driver .
Well, your terminology is not quite correct. A driver can create
a
symbolic link for itself with a given file name. You don’t make
a
symbolic link between an application and a driver.
> In Windows NT(r) 4.0 and earlier versions of the NT-based
operating system, drivers named their device objects and then set up
symbolic links in the registry between these names and a user-visible
Win32(r) logical name.
>
> For Windows(r) 2000 and later, drivers do not name device
objects. Instead, they make use of device interface classes.
>
Symbolic links continue to work just fine, even into Vista, if
that’s
how you would prefer to access your device. Device interfaces
are
another method, with certain advantages (flexibility) and
disadvantages
(simplicity).
> so i want this creation using the device interface class, i.e
i want the program for both user application and and driver code to
impliment this issue.
>
There are many samples in the DDK that do this. The very
thorough
“toaster” sample includes a number of example drivers that
register a
device interface, and then access that device interface from
user-mode apps.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Send free SMS to your Friends on Mobile from your Yahoo! Messenger.
Download Now! http://messenger.yahoo.com/download.php — Questions?
First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer