|
slomoman wrote:
but a char array still needs a CONSTANT size, not a variable size, right?
Sure, but you should not allocate it statically. Use the value that GetFileSize() returns to create a dynamic char array using new or other memory allocation mechanism you find more convenient. It should be something like this:
TCHAR *pBuffer;
DWORD dwSize = GetFileSize(hFile);
pBuffer = new TCHAR[dwSize];
if(pBuffer)
{
delete [] pBuffer;
}
else
{
}
TCHAR is the UNICODE equivalent of char .
Regards,
João Paulo
|
|
|
|
|
I wrote an MFC app (PPC2002), but I can't close it. When I click (x) in the upper right corner, the window disappeards, but my app is this there in the task-manager.
I think PocketPC wan't it like that because the same happens with pocketword and all the other apps. but for developing and debugging, i don't like that.
Is there a way I can really close my app?
thx, Daniel
|
|
|
|
|
|
ok, i found out more on that:
Normally, I can close my app (ppc2002, evc3) and restart without problem. however, if I call the following line more than three times, i cannot close anymore and the PPC crashes when i try to close.(soft-reset).
void CSTHtmlDialog::SetHtml(CString* strHtml){
::SendMessage(m_hwndHtml, DTM_ADDTEXTW, FALSE, (LPARAM) (LPCTSTR)*strHtml);
m_hwndHtml is a CDialog that uses htmlview.dll and <htmlctrl.h>.
What can i do? i'm going crazy
thx, Daniel
|
|
|
|
|
slomoman wrote:
m_hwndHtml is a CDialog
Is it a CDialog or the child HTML Viewer control?
Regards,
João Paulo
|
|
|
|
|
actually, it is a CSTHtmlDialog from http://www.codeproject.com/ce/sthtmldialog.asp. But that is dereived from CDialog.
thx, Daniel
|
|
|
|
|
Have you tried using CSTHtmlDialog::SetHtml() ?
Regards,
João Paulo
|
|
|
|
|
João Paulo Figueira wrote:
Have you tried using CSTHtmlDialog::SetHtml()?
Yes, that's what i used and that's what caused the problem...
thx, Daniel
|
|
|
|
|
ok, i found out more on this.
my problems seems to have something to do with the html i am showing.
i modified the html and now it seems to work (at least now...).
the reason could be one ore more of the following:
1) links to jpgs were to long. I had some links that were 32 characters long, and that always causes problems after some of those images. now the link (and the filename) is 15 chars long and it seems to work.
2) the character "\" in the path to the image. Now I have all images in the base-directory ("\")
2) German Umlauts in HTML could be a problem. (i replaced ä,ö and ü with ä etc).
3) Maybe the character " (quoatation) within -tags is a problem.
wow, this took me 3 days of work. Probably all because my image-filenames were too long.
and remember, the images and all other html were always shown correctly. I just couldn't close my application after it anymore and i had to soft-reset my PDA in the end.
strange strange strange
thx, Daniel
|
|
|
|
|
I created a Document/View-SDI Application for Pocket PC 2002 a while ago. It works fine and want ot reuse it.
At the beginning the app show the Document, but now I want to show a CDialog class I wrote. How can I show that instead (or on top) of the document.
Further question:
When I show dialogs, the Main-Applications Tool- and Menubar are not shown anymore. Can I show a dialog and use the menubar and toolbar at the same time? How?
thx, Daniel
|
|
|
|
|
I have a ppc application that opens and shows an html-file. it's places in "/programme/bla".
Where do I have to put that file so that the Emulator (evc3) finds that file?
thx, Daniel
|
|
|
|
|
The emulator does not have access to the PC file system. To copy file to and from the emulator, use the Tools / Remote File Viewer menu option.
Regards,
João Paulo
|
|
|
|
|
are all files deleted when i close the emulation program?
why is there so few memory? i can only add 600kb....
thx, Daniel
|
|
|
|
|
slomoman wrote:
are all files deleted when i close the emulation program?
Depends on how you close the emulator. You may ask it to save its state.
slomoman wrote:
why is there so few memory? i can only add 600kb....
Read the readme:
Changing the Memory Configuration of the Emulator
By default, the emulator will start up with about 16MB of RAM available for the device – with approximately 8MB each for Program Memory and Object Store. Generally, this is sufficient and reduces the physical memory requirement on the development machine hosting the emulator. However, if you wish to increase the amount of memory available within the emulator, change the Memory value in this registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows CE Tools\Platform Manager\{F384D888-F9AA-11D1-BB9E-00A0C9C9CCEE}\{DE9660AC-85D3-4C63-A6AF-46A3B3B83737}\{F384D894-F9AA-11D1-BB9E-00A0C9C9CCEE}\{67C8D913-F0CF-486A-8CF0-CE7D116225E8}
From 32 to 48 or 64.
This value indicates the total amount of memory available to the emulator for both the Pocket PC 2002 image and the available memory. The image requires between 16 and 24MB depending on the language version of the image (Japanese, Chinese Simplified, and Chinese Traditional images are approximately 24MB) and whether the image includes support for GSM radios.
Regards,
João Paulo
|
|
|
|
|
oh thx. this helps.
thx, Daniel
|
|
|
|
|
you can open evc ,in the section project->setting->debug->download to set the download directory in the remote pocket pc(emulator).
good lucky.
|
|
|
|
|
please drop me devices that are known to have rs232
port or cable connector.
i know only ipaq h36xx ...
thanks in advance.
|
|
|
|
|
iPAQ 38xx, 39xx, 54xx
Regards,
João Paulo
|
|
|
|
|
I need to create a Pocket PC 2002 program which prompts the use for a Folder name. Instead of reinventing the wheel, I tried using SHBrowseForFolder with the following code:
if (SHGetMalloc(&imalloc) == NOERROR) {
if (itm = SHBrowseForFolder(&browseinfo)) {
imalloc->Free(itm);
}
}
(This is just the test code).
The compiler compiles the code fine, but the linker threw me this error:
error LNK2019: unresolved external symbol __imp__SHBrowseForFolder referenced in function "long __cdecl MAINDIAG_PROC(struct HWND__ *,unsigned int,unsigned int,long)" (?MAINDIAG_PROC@@YAJPAUHWND__@@IIJ@Z)
I tried linking CESHELL.LIB and AYGSHELL.LIB with my exe file, but the error still persists. Anyone has any ideas??
|
|
|
|
|
|
Can I use Enbedded Visual C++ 4.0 to write programs for Pocket PC 2002?
(or do I have to use evc++3 ?)
thx, Daniel
|
|
|
|
|
You have to use eVC3.
Regards,
João Paulo
|
|
|
|
|
If the platform is based on Windows CE 3.0 or older, use eVC 3.
If the platform is based on Windows CE.NET 4.0 or newer, use eVC 4.
Changes were made to the debugging API in Windows CE.NET 4.0 which mean that eVC 3 can't debug on that platform. Likewise eVC 4 cannot debug on CE 3.0.
Microsoft are enforcing this by only showing CE 3.0 and lower SDKs as targets in eVC 3, and CE 4.0 and higher SDKs in eVC 4.
Pocket PC 2000, Pocket PC 2002 and Smartphone 2002 are based on Windows CE 3.0; Pocket PC 2003 and the forthcoming Smartphone 2003 (Windows Mobile 2003 for Smartphones) are based on CE.NET 4.2. Few people will ever develop on a custom OEM platform, but if you need to, check with the OEM to see which version of Windows CE it's based on.
I work for a custom software house specialising in data capture applications; we write software for some custom barcode-enabled handheld computers which are not based on Pocket PC. Sometimes this is a blessing (we have to work around the Pocket PC shell a lot of the time) and sometimes a curse (where a library available on Pocket PC isn't in the OEM's platform).
|
|
|
|
|
Hi!
My company is starting a solution where we will be dealing with multiple Pocket PC's updating a database concurrently (each one doing so once every 8 - 30 seconds).
There will be some processing done via SQL Server stored procedures to help consolidate the data as there is some central logic done on each PDA's data. We don't want each PDA to have to wait in order to post its data to the database (i.e. this will be done in a dedicated separate thread if pushing the data to the stored procedure takes too long).
My request for comments is for how you would go about implementing this system. The work to put the data into the database will be done through a stored procedure, so the Pocket PC's don't have to call much (or push much) data to the database.
I was considering doing a Web Service that would call the stored procedure, but I'm not sure how responsive it would be in a local environment with approx 3 to 20 PDA's.
I have also read briefly about .NET remoting but I don't even know if the little Pocket PC can handle this.
Finally, I am mostly a C++ programmer (MFC) and so doing raw sockets is also an option... but there seems to be a lot of support for this type of communication across networks (or is it mostly hype ).
I guess the biggest question is: What solution path would you take in terms of
- development time (this is a pilot project)
- scalability
- extensibility
- simplicity
Is there enough built in goodies in .NET such that I won't have to 'reinvent the wheel' too much?
Thanks for your time.
-Chris
|
|
|
|
|
A few questions:
How do the PDAs connect to the server?
Are the PDAs storing any temporary info, or they just immediately flush any data they acquire to the database?
From my own experience, using SQL CE connectivity will greatly simplify your development process, and it does seem to fit well in all your delvelopment requirements.
As for .NET, I'm no expert. My experience comes solely from the C++ field where these solutions have been thoroughly tested and used.
Regards,
João Paulo
|
|
|
|