|
Hi !
Thanks for response.
First, fopen is supported. Taken directly from the MSDN help (from win CE !):
Remarks
The fopen function opens the file specified by filename. _wfopen is a wide-character version of fopen; the arguments to _wfopen are wide-character strings. _wfopen and fopen behave identically otherwise.
If I still want to use char* in winCE, that's because I want to import some of my desktop libraries (I cannot write everything again). So, if char is supported for some functions (like fopen), I won't change everything !
Second, the "solution" to the problem: I made some test (open a file in write mode so I can check where is the default directory). The error is what I supposed it is: the default directory is not the directory of the executable, it's the "main root". So, I have to specify complete path
Anyway, thanks for help !
PS: I think I will post some silly questions like that for a while 'cause it's the first time I work on a PocketPC and I worked a lot before on desktop version... !
|
|
|
|
|
cedric moonen wrote:
First, fopen is supported.
It is, but are you reading ANSI or UNICODE content? Are you specifying ANSI or UNICODE filenames and modes? When I moved to CE, I forgot about ANSI just to make my life less miserable, and it worked.
cedric moonen wrote:
So, I have to specify complete path
Yes, CE is a bitch.
Is it working, now?
|
|
|
|
|
João Paulo Figueira wrote:
Are you specifying ANSI or UNICODE filenames and modes?
I just open it for reading ("r") and that works fine. The contents are normal string that are stored in char*.
João Paulo Figueira wrote:
When I moved to CE, I forgot about ANSI just to make my life less miserable, and it worked.
Yep, but I cannot do that: I have a huge library that was developed on desktop environment and I want to reuse it (rewrite everything will take me really too much time) and I need to be compatible with the file format from my desktop computer (they need to understand each other). So, I have no choice: I will need to use ANSI string and convert them to UNICODE when they are not supported !
But I think I'll find a way out !
João Paulo Figueira wrote:
Is it working, now?
Yes, it is !
Anyway, thanks
|
|
|
|
|
cedric moonen wrote:
Is it possible that the "working directory" of the executable is not his own directory ???
Windows CE does not support 'working directories'. You will have to supply the full path to the file you wish to open. GetModuleFileName can be used to find the path to the exe.
Jonas
“Our solar system is Jupiter and a bunch of junk” - Charley Lineweaver 2002
|
|
|
|
|
Hi,
Ok thanks
|
|
|
|
|
hi,
i can be able to download/upload text files without any data loss.but i can't succeed when it is a binary file.
how can i resolve it ?
please guide me its urgent
thanks
siva
|
|
|
|
|
Hi,
I am not quite sure if this is the right place to put this but forgive me if it is not.
I have recently being toying with the idea of developing what i can quite inadequately only describe as a remote desktop. This will bear similarities with a citrix system on a network, except it will not primarily be on a network.
Imagine if you would a platform with a reliable internet connection, it need not have any applications installed apart from a client side application. This application allows it to embed within it any application for which it is licensed(an authorised client/subscriber) to use from a server running those applications.
Essentially it will be like having your c:\Program Files drive on a remote server. One would not necesarily need to have an application to use it. It may be possible to work around licensing by charging on a per thread/per single use basis.
Initial responses are that this domain is too vast for single developer implementation. As such it would be worthwhile identifying potential problem areas and contributing to those.
A totally simplistic, if at all realistic approach will be to use a common interface/ medium across all platforms ie www. and embed applications in typical applet style.
If there is any interest, critisism, contributions or any help on this and relating issues I would be most grateful for some feedback. I am considering this as a potential degree project.
Direct contact will also be welcome.
|
|
|
|
|
i am using embedded VC++3 for a project and needs to load more than 1000 records for user selection. the normal LB_ADDSTRING method per records is very slow. i saw LB_INITSTORAGE method. it seems a bit faster but since it allocates memory to it, there is no deallocation to it..so how to i deallocate memory from it after loading into listbox?
Actually the best way is read everything from the data and wcscat it to a temporary storage. after all records are read, then call the LB_ADDSTRING. this method is almost instand but i can't sort the records and also the records are not separated like if i use LB_ADDSTRING.
Any adviceS??? thanx.
|
|
|
|
|
Dear Friends,
Did any body know how to set bypass listt for the proxy for IE 5.5 on Windows CE .NET.
For ex i want set "*.abc.com" as bypass list for my IE 5.5 on Windows CE .NET.
Thanks and Best Regards,
Subbu,
2003/06/16 (13:31 JST).
|
|
|
|
|
Hi,
I have a image database in memory. When i want to display it on the screen, i use WinDrawBitmap. But this function does not allow me to resize my image. Is there anyway I can resize my images to show them as thumbnails?
Thanks.
|
|
|
|
|
Hi,
I am trying to port some .NET code to .NET CF. This code contains a lot of thread dependencies. Some threads must start and stop others or wait for them to be started or stopped. .NET has great support for thread synchronization but it is crippled in .NET CF. I can't use the Monitor.PulseAll() method or the Thread.IsAlive, .Abort or .Join methods. In the good old days of Win32 I could use WaitForSingleObject to wait for a thread that signals the mutex. This functionality is replaced by .join etc. but that is not available in the Compact Framework.
I know that I can implement the synchronization with AutoResetEvent and ManualResetEvent but than I have to use a variable that is checked by a thread to find out that another thread wants to stop it.
I really like the .NET thread synchronization mechanisms and I don't like to go back to the old-fashioned "polling" type of synchronization.
Who can point me to .NET CF specific multi threading info?
Regards, Gaston Rommens
|
|
|
|
|
Hi All,
How to hide start menu alone in win ce h/pc 2.11 ?
I can be able to hide the task bar and how to hide the start menu alone using Win CE API's.
The following code is used to hide the entire task bar.
Dim hwnd As Long
Dim lret As Long
hwnd = FindWindow("HHTaskBar", "")
lret = ShowWindow(hwnd, SW_SHOW)
'--- Code to set the form on top.
lret = SetForegroundWindow(Principal.hwnd)
lret = SetWindowPos(Principal.hwnd, HWND_TOPMOST, 0, 0, _
GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), _
SWP_SHOWWINDOW)
please any one having any idea in this regard if so help me out
thanks,
siva
|
|
|
|
|
I'm developing a CE data entry program using eVC++ 3.0 with MFC. It uses a memory-mapped database. The database file can reside pretty much anywhere on the CE device, but I've been recommending that users (testers) keep it in non-volatile memory such as a CF card for data safety. Well that sure backfired!
Here's the problem: If the device (Pocket PC 2002 so far) is suspended then resumed while the program is running, all of the pointers to the database on the CF card seem to get scrambled, and point to garbage within the database. This does NOT happen if the database resides in the device's onboard memory, even after multiple suspend/restarts.
Anyone know what's going on with the CF card? Right now the only work-around I can think of is to detect when the device is being suspended, and clean up/close the database, then re-initialize everything when the device is resumed. However, I can't find how to detect either suspend or resume.
Aaaaaaaaaargh!
majoob
|
|
|
|
|
majoob wrote:
Right now the only work-around I can think of is to detect when the device is being suspended, and clean up/close the database, then re-initialize everything when the device is resumed. However, I can't find how to detect either suspend or resume.
I've had the similar problem with power off/on wrt the COM port. I used the following to fix the problem:
In my main exe I register a notification handler tied to NOTIFICATION_EVENT_WAKEUP that will be executed every time power is turned on:
<br />
CE_NOTIFICATION_TRIGGER nt;<br />
TCHAR szExeName[] = TEXT("\\windows\\XXXEventManager.exe");<br />
TCHAR szArgs[] = TEXT("-P");<br />
<br />
memset (&nt, 0, sizeof (CE_NOTIFICATION_TRIGGER));<br />
nt.dwSize = sizeof (CE_NOTIFICATION_TRIGGER);<br />
nt.dwType = CNT_EVENT;<br />
nt.dwEvent = NOTIFICATION_EVENT_WAKEUP;<br />
nt.lpszApplication = szExeName;<br />
nt.lpszArguments = szArgs;<br />
<br />
hNotificationHandle = CeSetUserNotificationEx (0, &nt, NULL);<br />
Then in XXXEventManager.exe I notify my com-port handler that it needs to reinit itself.
In my case, that was housed in a DLL that I could load and reinit, but I guess it could be handled in many ways, even w/o an extra exe-file.
Just remember to call CeRunAppAtEvent(PathToYourExe, NOTIFICATION_EVENT_NONE) somewhere when you dont need the notification anymore, otherwise you will never get rid of the notification w/o a hard reset.
majoob wrote:
Anyone know what's going on with the CF card?
I know too little about how the CF port get mapped/mounted to even try to answer that. =)
“Our solar system is Jupiter and a bunch of junk” - Charley Lineweaver 2002
|
|
|
|
|
Thanks Jonas, After doing a little research I discovered that its not that the pointers are getting permanently "scrambled" as I first thought, but that it takes the WinCE operating system a few seconds after a resume to reinitialize the card (handles and pointers to the files that were open on the card).
It probably depends on the make and model of the card, but my Kingston CF card took right around 5 seconds after a resume to kick in. If I waited those five seconds before entering data then all was well. So, here's what I did in the data entry loop:
CWaitCursor wait;
m_cFile.GetStatus(m_sFileName, m_rStatus);
wait.~CWaitCursor();
Execution stops for 5+/- seconds on the GetStatus line until the card is initialized, then the waitcursor goes away and the user can continue. Once the card is initialized there is no perceptible delay in execution and the user doesn't see the waitcursor.
Seems a little kludgy but it works. Anyone see a danger in doing this?
majoob
|
|
|
|
|
I have develop an application for my PDA using eVB and pocketSOAP.
I manage to get the base64 string from my pocketSOAP. But, i meet some
problem.
I am newbie in eVB, so, my question is how to convert the base64 string into
an image file and load it into picturebox?
It is urgent ! I hope somebody can help me.
Thanks and best reguards.
jess
|
|
|
|
|
I get an error message debugging smart client apps (consuming 'local' Web Service) deployed to the emulator in vs '03 : "unable to connect to the remote serve". I can’t find much on the setting.
Any pointers would be appreciated.
|
|
|
|
|
I am unable to disable a second level menu item.
I have a Tools popup menu on my menubar that contains two items and a popup item that also contains two menu items. It looks like this:
Tools
|- Toggle Enable/Disable
|- Item
|- SubMenu ->
|---- SubItem1
|---- SubItem2
I used ClassWizard to add the usual ON_UPDATE_COMMAND_UI functions. In the appropriate function, I can use "pCmdUI->Enable(FALSE)" to disable "Item", but I can't disable "SubItem1" and "SubItem2". Matter of fact, the functions that ClassWizard generated for my two sub menu items are never even called. I have breakpoints on both these function and they are never even hit.
This bug occurs on both my emulator and on my Compaq iPaq (arm processor). I created the project with AppWizard and am using a "Basic MenuBar".
Any ideas? Can anyone else disable a submenu item?
|
|
|
|
|
After reporting this issue to Microsoft's tech support, they acknowledged that this was a bug in Pocket PC 2002.
|
|
|
|
|
I need to create an application that obtains my recieved sms from a gsm modem conected to my PC through any of my Ports. After obtaining this information I need to added this information to a MS Access or SQL database so that it can manipulated with other applications (asp).
Also, if its possible, I would like to automatically respond to the number that sent the sms with an "out to lunch" message.
HELP!!
thanks
Jon
X-ZD Designs
|
|
|
|
|
To read some SMS messages from the mobile phone or to send some SMS messages you can use the AT commands.
Just take a look at my article here at CodeProject: Infrared Communication with your Mobile Phone
It will show you how to send / receive some AT commands to your mobile phone. The sample application
works via IrDA, but with some little changes it will also work via a serial communication.
PJ Naughter has also written a very nice program (MfcSMS v1.01) to send some SMS messages. You can find
it on his homepage at http://www.naughter.com/mfcsms.html.
I hope this will help you!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
wow. great job.
That info was really useful. But considering that Im am kinda of new to the subject...I still have a couple of questions:
What Im trying to do is create an application (or if you know where I can find one) that reads from a GSM modem or a phone conected to one of my serial ports.
I need the application to have a routine where it reads the SMS from the phone, saves the information into a Database, and erases these SMS. I also need to be able to send messages depending on the information saved into my database.
From what I understand, your application reads the information from the phone...but does it have a way of procesing it??
X-ZD Designs
|
|
|
|
|
I've been asked to think up a solution involving barcode scanners.
I have absolutely no experience in this area, so I am looking for names, links and tutorials.
The scanner must, naturally, be programmable.
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
Hi,
I need to transfer file from my handheld PC to the remote pc using these protocols.The receiving end ,it may use hyperterminal s/w or anyother standard terminal emualtor.
But the application which is runing on the H/PC should syncronize with the target terminal emulator and has to work according to the protocol selected by both end.
Any resources for XYZModem protocol implementation using C/C++???
Please help me out and suggestions are most welcome.
Thanks,
siva
|
|
|
|
|
Hello!
I need my Pocket PC to receive data over the BlueTooth link. How can I do to open the port and work with it ? I suppose I can open it with CreateFile and providing a name like "COMx", but where can I find the port number ??
I also 'coupled' my Pocket PC with my computer.
Any idea ?
Thanks
|
|
|
|