Re: Bluetooth Printing - Nobody knows about it ? by MichalRizek
MichalRizek
Tue Jul 25 03:11:01 CDT 2006
Hi,
connecting to bth serial port is quite easy:
First you need to import some native api funtions like RegisterDevice,
DeregisterDevice, CreateFile and so on. And declare PORTEMUPortParams struct
use by native functions...
Then you register new device to port u wish to use:
PORTEMUPortParams pp = new PORTEMUPortParams();
pp.channel = myChannel;
pp.flocal = 0;
pp.device.SetInt64(myBthAdress);
pp.uiportflags = 0x00000002;
PORTEMUPortParams *p = &pp;
RegisterDevice( "COM", (uint)portNumber, "btd.dll", (uint)p);
Then you can work with registered device like with any other com port:
int hFile = CreateFile( string.Format("COM{0}:", portNumber), GENERIC_READ |
GENERIC_WRITE, 0,0, OPEN_EXISTING,0,0)
Michal Rizek
"Bhavesh" wrote:
> Hi,
>
> You want to say that you had set up Bluetooth connectioin from your
> code for Pocket PC device?
> Please tell me how you did it via coding @ Compact Framework.
> and can you tell me which Bluetooh Media you are using for WinCE.
>
> We are doing Printing for PPC and WinCE both device.
>
> Bhavesh Rana.
> "A man is great by deeds, not by birth."
>
>
> Ali Mertoglu wrote:
>
> > Hi,
> > I am trying to print invoice from CASIO CE.NET 4.1 device to serial printer
> > which has bluetooth. I am working on Franson Bluetools component, but I
> > couldn't success to send data from CE.NET 4.1 device. It works on POCKET PC
> > 2003 Mobile device but not CE.NET 4.1.
> >
> > Is there any other component or source code for discover, connect and send
> > data via bluetooth ? I really need this type of connection and I couldn't
> > understand that, CF has no capability for spesific functionality .
> >
> > Thanks in advance !
> >
> > Ali.
> >
> > Vizyon Bilgi Islem Ltd.
> > Istanbul/Turkiye
>
>