Re: Virtual COM port with UMDF



You would have to debug the application at this point.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Andre" <Andre@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:04EC096C-433D-4BFD-BE57-DB31C5AB77FD@xxxxxxxxxxxxxxxx
Hi,

now I have included the steps you recommended. I am using the PortName
assigned by the ports class installer as symbolic link, which works fine. To
create the device name mapping I obtain the device name with method
IWDFDevice::RetrieveDeviceName() and use the result which leads to the
following additional serial comm device name mappings in the registry

[HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM]
...
"\\\\.\\UMDFCtrlDev-e4cbea35-44d3-11dc-9762-0003ffa3650f"="COM3"

However, still the .NET application is not able to open this virtual com
port. Again I got the error message described in the original post.
Is there anything wrong with the device name? Must I retrieve it somewhere
else?

Regards,
Andre


"Doron Holan [MSFT]" wrote:

you need to write the port name to HKLM\HARDWARE\DEVICEMAP\SERIALCOMM. the
KMDF or WDM serial sample shows you how to do this. unfortunately, a UMDF
driver cannot write to this key so that it is not possible without external
help (either you modify the ACL of the key which is bad or you have some
other comnponent with sufficient privleges to write to the key).

furthermore, install your device under the ports class and use the PortName
assigned to your driver instead of a hardcoded name (COM9). You will find
the PortName in the device node under a registry value of "PortName" :
REG_SZ.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"Andre" <Andre@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:3E3932F7-194A-439B-9572-D93CD4B9F75E@xxxxxxxxxxxxxxxx
> Hello,
>
> I have created a UMDF driver, which creates a virtual serial com port > in
> three steps:
> m_FxDevice->CreateDeviceInterface(&GUID_DEVINTERFACE_COMPORT,NULL);
> m_FxDevice->CreateSymbolicLink(L"\\DosDevices\\Global\\COM9");
> m_FxDevice->AssignDeviceInterfaceState(&GUID_DEVINTERFACE_COMPORT,NULL,TRUE);
>
> I want to test this com port with a .NET application using the > SerialPort
> component to access my driver. However, the GetPortNames() method does > not
> find this serial port. Also, if I explicitly specify COM9 as port name
> then
> the component fails to open the port and throws an exception, stating > that
> "the given port name does not start with COM/com or does not resolve to > a
> valid serial port. Parameter: portName"
>
> Must the driver take any additional steps to create a complete virtual
> serial port?
>



.



Relevant Pages

  • Re: Virtual COM port with UMDF
    ... Please do not send e-mail directly to this alias. ... newsgroup purposes only. ... I would like to debug into the SerialPort component of .NET, ... >> you need to write the port name to>> HKLM\HARDWARE\DEVICEMAP\SERIALCOMM. ...
    (microsoft.public.development.device.drivers)
  • Re: Virtual COM port with UMDF
    ... component SerialPort can now open my virtual com port. ... Please do not send e-mail directly to this alias. ... I would like to debug into the SerialPort component of .NET, ... driver cannot write to this key so that it is not possible without ...
    (microsoft.public.development.device.drivers)
  • Re: Virtual COM port with UMDF
    ... virtual com port. ... The file type returned by GetFileTypeis 1, ... Please do not send e-mail directly to this alias. ... I would like to debug into the SerialPort component of .NET, ...
    (microsoft.public.development.device.drivers)
  • RE: RS485 for PXA255
    ... and not an external device. ... the serialport driver ... We have implemented this in hardware and made the necessary driver ... The registry keys are only those used by the serial port driver. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Virtual COM port with UMDF
    ... Please do not send e-mail directly to this alias. ... I would like to debug into the SerialPort component of .NET, ... >> you need to write the port name to HKLM\HARDWARE\DEVICEMAP\SERIALCOMM. ... >> assigned to your driver instead of a hardcoded name. ...
    (microsoft.public.development.device.drivers)