Re: how to access the serial port exported functions in my applica

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Once again, you cannot access a serial port by loading the serial
driver DLL into your application via LoadLibrary. Instead, for CE
5.0, the driver DLL is loaded by DEVICE.EXE and your application
should access it by opening the port using CreateFile and then
interact with the port using the Serial Communcation APIs such as
SetCommState, SetCommTimeouts, SetCommMask, WaitCommEvent, etc., and
ReadFile and WriteFile to read and write data to and from the port.

Why are you trying to use the COM16550 driver? Are you actually
trying to use a 16X50 UART, or might you in fact be trying to use one
of the PXA270's on-chip UARTs? If the latter, COM16550 is the wrong
driver, and your BSP should include a serial driver to support the
PXA's UARTs.

Tom Gensel (eMVP)


On Fri, 19 Jun 2009 00:30:01 -0700, Nagaveni
<Nagaveni@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:


my serial port is accessable till bootloader(PXA270+wince5.0).I tried to
enable the kernal debug port as COM port. not able to enable so I'm trying to
load serial by LoadLibrary.

Can any one help me to solve this. below is my platform settings,whats wrong
with this..............

this is my platform.reg

;
-----------------------------------------------------------------------------
; @CESYSGEN IF CE_MODULES_SERIAL
;IF BSP_NOSERIAL !
;COM1
;IF BSP_SERIAL
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial]
"Irq"=dword:16 ; 22 IRQ_FFUART
"SysIntr"=dword:1d ; 29 SYSINTR_FFUART
"MemBase"=dword:40100000 ; FFUART Register
"MemLen"=dword:40
"DeviceArrayIndex"=dword:80 ; FFUART object
"Prefix"="COM"
"Index"=dword:1
"IClass"="{CC5195AC-BA49-48a0-BE17-DF6D1B0173DD}"
"Dll"="com16550.dll"
"Order"=dword:0

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\Serial\Unimodem]
"Tsp"="Unimodem.dll"
"DeviceType"=dword:0
"FriendlyName"="Serial Cable on COM1:"
"DevConfig"=hex: 10,00, 00,00, 05,00,00,00, 10,01,00,00, 00,4B,00,00,
00,00, 08, 00, 00, 00,00,00,00

;ENDIF BSP_SERIAL
;ENDIF BSP_NOSERIAL !
; @CESYSGEN ENDIF CE_MODULES_SERIAL
; -----------------------------------------------------------------


for this also i m getting the error. I have added the standard com16550.dll,
can any one tell me how to proceed further
"Valter Minute [eMVP]" wrote:

Nagaveni wrote:
Hi All,

I am trying to load com16550.dll using
LoadLibraryEX(L"com16550.dll",NULL,LOAD_LIBRARY_AS_DATAFILE);
I am not able to retrive the address of an exported function from the
specified dll.I am using GetProcAddress(hDll,"COM_Open");
how to access the serial port exported functions in my application explicitly.

If you can explain why you want to do that someone may expose a better
solution.
In CE 6 you can't load a driver inside an application. If it's part of
the OS image it will be mapped in kernel space and so you will not be
able to load it, if it's loaded from storage it will not be able to
access hardware directly and so it won't work anyway.
If you need to send/receive data using that serial port you can use
CreateFile to retrieve an handle and then Read/WriteFile, SetCommState
and other system APIs to communicate with the driver, no need to load it
inside your app.


--
Valter Minute (eMVP)
www.fortechembeddedlabs.it - Training, support and development for
Windows CE
www.geekswithblogs.net/WindowsEmbeddedCookbook - My embedded programming
and cooking blog
(the reply address of this message is invalid)

.



Relevant Pages

  • Re: Ignore one server except in extreme conditions?
    ... But that requires SiRF binary mode which precludes using the NMEA driver. ... But if I run the PPS into a port all by itself and never ... It's also the only OS left that supports most of the serial port functions on sparc hardware. ...
    (comp.protocols.time.ntp)
  • Re: Can a USB driver exposed functions like RS232 COM port?
    ... I mean a Serial Appliation S/W talk to USB port? ... you can create a USB class driver which makes your cable ... If you would have all that but a serial port on hand held device, ...
    (microsoft.public.windowsce.platbuilder)
  • Re: how to access the serial port exported functions in my applica
    ... Why aren't you using the Mainstone serial driver? ... my serial port is accessable till bootloader.I tried to ... ;ENDIF BSP_NOSERIAL! ... I am trying to load com16550.dll using ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Can a USB driver exposed functions like RS232 COM port?
    ... the connection from USB to the serial port connected to whatever is on the ... you can create a USB class driver which makes your cable ... If you would have all that but a serial port on hand held device, ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Serial Communications - Lost Event
    ... "Completion of write" is a moment when all data from the app buffer is ... The driver can keep the data in its internal buffer ... > serial port monitoring and test applications. ... > of a serial port means when all of the data has been transfered. ...
    (microsoft.public.win32.programmer.kernel)