|
Hi, Daniel
---Did the GetProfileString API function don't work on your system?
I am aware of GetProfileString.
In Win32Application programming i am using GetProfileString as follows
TCHAR strRetn[100];
GetProfileString("Aloap","Timer",NULL,strRetn,100);
//Aloap is section and //Timer is Key and \\strRetn is value
MessageBox(hDlg,strRetn,strRetn,0);
by default the GetProfileString function lookint Win.ini file
My need is...
I have to use same function in Win32CE Application Programming.
and also i have to read section values my own INI file instead of
win.INI.
I hope now my need is clear to you
please help me in this context
thank you.
regards.
|
|
|
|
|
<br />
TCHAR szReturn[1024];<br />
<br />
GetPrivateProfileString(_T("YourSection"),<br />
_T("YourKey"),<br />
_T("YourDefault"),<br />
szReturn,<br />
sizeof(szReturn) / sizeof(TCHAR),<br />
_T("YourPath\YourIniFile.ini"));<br />
<br />
AfxMessageBox(szReturn);<br />
This API function is to read some values from a user defined INI file.
Just take a look on the MSDN documentation of the GetPrivateProfileString API function.
<br />
DWORD GetPrivateProfileString(<br />
LPCTSTR lpAppName,
LPCTSTR lpKeyName,
LPCTSTR lpDefault,
LPTSTR lpReturnedString,
DWORD nSize,
LPCTSTR lpFileName
);<br />
There are some things you have to attention:
lpDefault
[in] Pointer to a null-terminated default string. If the lpKeyName key cannot be found in the initialization file, GetPrivateProfileString copies the default string to the lpReturnedString buffer. This parameter cannot be NULL.
lpFileName
[in] Pointer to a null-terminated string that specifies the name of the initialization file. If this parameter does not contain a full path to the file, the system searches for the file in the Windows directory.
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Hi, Daniel
Thank you,
one more function added into my library (upto now i didn't aware of
"GetPrivateProfileString")
still i am in truble......
i am getting following error while compiling:
what libraries i have to add for this function.
i added <windows.h> in stdafx.h
--Configuration: TestINI - Win32 (WCE x86em) Debug---
Compiling...
TestINI.cpp
D:\ClearMe\TestINI\TestINI.cpp(203) : error C2065: 'GetPrivateProfileString' : undeclared identifier
Error executing cl.exe.
TestINI.obj - 1 error(s), 0 warning(s)
Thank you for your extending cooperation..
regards
anju
|
|
|
|
|
Oh... Sorry, I found out that the GetPrivateProfileString API function are not supported by the Windows CE system. It only works on the desktop Windows systems.
I think you should use some of the open source INI file parsers, like the INI Parser Library at Sourceforge.
I hope this library will help you! It's a simple ANSI C parser for INI files. Just add it to your project and try it!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Hello,
Try to use the registry.
Use the following registry functions:
RegCreateKeyEx
RegOpenKeyEx
RegCloseKey
RegDeleteValue
RegQueryValueEx
RegSetValueEx
RegEnumKeyEx
Raphael Amorim Dantas Leite
VC++, VB, Java, .NET and eMbedded Programmer
|
|
|
|
|
Everyone:
who tell me how to "skin-enabled" my application?
I wanna to build a new "CskinView" species,it can displaying BMP,GIF,and other graphics in my C++ applications.
Thank you very much!
liro
|
|
|
|
|
Is there any COM-Interface (or something else) to add a name to the list of contacts of my Pocket PC.
I am working with eVC 3.0 and Pocket PC 2002.
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Check ou the POOM (Pocket Outlook Object Model). There's a good reference of it in "Windows CE 3.0 Application Programming" by Nick Grattan and Marshall Brain (PH). Or MSDN...
|
|
|
|
|
Thanks!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Maybe this code might help
Desc:
is a sample demonstrating using the Pocket Outlook Object mode (via COM interop). The application lets you view all of the contacts on your Pocket PC, add new ones, and delete existing ones. It consists of a managed application built on top of the .NET Compact Framework and a native DLL written in C++ using eMbedded Visual C++ 3.0. The source for both the managed and native components is provided. Written in C#
Source:
http://www.gotdotnet.com/team/netcf/samples/POOM/POOM.zip
Good Luck!
R.Bischoff | C++
.NET, Kommst du mit?
|
|
|
|
|
Hi,
I was wandering if you can run a Multimedia Title (like a multimedia application of a cd-rom) to a palmtop.
Is this possible?
What hardware and software do you need in order to accomplise that?
Thanks for your help
|
|
|
|
|
Hi, everybody. I am trying to find an IEEE-428 specification on the WEB and I was out of luck so far. If anybody knows about such resource, please let me know.
Thanks.
|
|
|
|
|
I'm writing a dll with support functions for FTP upload,download on Pocket PC. I'm using WinInet, but I'm a little confused about implementing async Wininet FTP download and uploads and about this whole async terminology.
I have a CInternetSession derived class where I'm handling status callbacks, but since there are no MFC CFtpConnection, CFtpFileFind and stuff for PocketPC.
So without MFC, to make a connection I first call InternetOpen() with INTERNET_FLAG_ASYNC, use InternetSetStatusCallback to set the implemented callback. Once the request is processed,then I use FtpOpenFile() and update percent downloaded/uploaded with calls to InternetReadFile() and InternetWriteFile(). So is this async WinInet (FTP) or synchronous(blocking)?
How do I async read and write too? I'm confused. Pleas point me to some relevant links/code is possible.
Thanks for any help.
Hush,hush...
thought I heard you call my name now.
Kula Shaker.
Amit Dey
Latest articles at CP - PocketPC New menu
Office addin
|
|
|
|
|
Hi
My own code is a dll includes dialog box,written based on Win32 API(For WinCE).
I plan to attached a command bar when Dialog shown,but it doesn't work.
Why SHCreateMenuBar(&mbi) always return a NULL?
HINSTANCE hInst=NULL;
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
hInst = (HINSTANCE) hModule;
return TRUE;
}
HWND MyCreateRpCommandBar(HWND hwnd)
{
SHMENUBARINFO mbi;
memset(&mbi, 0, sizeof(SHMENUBARINFO));
mbi.cbSize = sizeof(SHMENUBARINFO);
mbi.hwndParent = hwnd; //HWND of dialog
mbi.nToolBarId = IDR_SIV_MENUBAR;
mbi.hInstRes = hInst; //HINSTANCE of dll
mbi.nBmpId = 0;
mbi.cBmpImages = 0;
if (!SHCreateMenuBar(&mbi)) //Command bar was dead here!!!
return NULL;
return mbi.hwndMB;
}
BOOL CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
static HWND hwndCB=NULL;
switch (message)
{
case WM_INITDIALOG:
hwndCB=MyCreateRpCommandBar(hDlg);
return TRUE;
case WM_DESTROY:
CommandBar_Destroy(hwndCB);
return TRUE;
}
return FALSE;
}
Please mail to sonicjet@pchome.com.tw ,if you have any recommend.
|
|
|
|
|
Does anyone know of a PCMCIA to USB (host) or CompactFlash to USB (host) for Pocket PC 2002?
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
I am developing mobile pages using MMIT.I need to give a background color for the label.I set the backcolor of the label to a particular color and when i view that page in the browser, the backcolor doesn't appear.
<mobile:label text="Checkthis" id="lbl" runat="server" backcolor="#ff3300">
Please reply the answer.
|
|
|
|
|
I am developing mobile pages using MMIT.I need to give a background color for the label.I set the backcolor of the label to a particular color and when i view that page in the browser, the backcolor doesn't appear.
<mobile:label text="Checkthis" id="lbl" runat="server" backcolor="#ff3300">
Please reply the answer.
|
|
|
|
|
hi there all
i would like some guidance on the following: how to program pocketpc's. i am not really sure where to begin, or what SDK to get, but the handheld i am thinking of starting with is a Compaq iPAQ, i assume it is running WinCE 3.0. i have found an SDK on msdn.microsoft.com, the Embedded VC++ and VB kit, which is about 300MB. is this what i am looking for, and is it worth my while to download?
thanks
Paul W
-- A wise fox has many exits from its burrow.
modified 18-Jul-18 11:59am.
|
|
|
|
|
Paul van der Walt wrote:
the Embedded VC++ and VB kit, which is about 300MB. is this what i am looking for, and is it worth my while to download?
Do you have broadband? If so it cant hurt to try it out right?;P
"We will thrive in the new environment, leaping across space and time, everywhere and nowhere, like air or radiation, redundant, self-replicating, and always evolving." -unspecified individual
|
|
|
|
|
Brian O. wrote:
Do you have broadband?
Broadband? whats that? at the moment i am living out of town, so no cable or broadband is available. i used to at least have ISDN, but since the modem gave it up, i am sitting with 56k anyway, hopefully that will change soon, otherwise i would have tried it.
Only the good die young, all the evil seem to live for ever. - Iron Maiden, Only the Good Die Young
modified 18-Jul-18 11:59am.
|
|
|
|
|
The iPaq (at least the new ones) are PocketPC 2002 which translates roughly to Windows CE 3.0 (but it's not quite the same). You need to get the Embedded C++ Compiler and SDK. The package all provides a Software PocketPC emulator that allows you to debug on the PC.
------- signature starts
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
hi all,
i am stuck.please help. my problem is I want to make a setup program for my vc++ application as we have in VB.can anyone help me out?
thanks in advance
regards
Himanshu
|
|
|
|
|
Take a look on "http://www.softspb.com/enterprise/devtools/ezsetup.html" and "http://www.pocketpcdn.com".
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
Hi all,
Please help
In my first card I ask for 3 user inputs. Where you want to start and end your journey and a time you want to travel after, in the format 12:25
<wml>
<card id="card1" title="Journey Planner">
<do type="accept" label="Next">
<go href="#card2">
Enter Start Station
Enter Destination Station
Enter Time
_The problem________________________________________________
In my second card I want to connect to a database in MicroSoft Access and use these variables in an Sql statement. I don't know the correct syntax for connecting to the database or for using the variables in my Sql statement. The Sql statement is incomplete, I just want to know how to use variables within it, setting them equal to something and saying something > $variable
________________________________
<card id="card2" title="Display results">
<%
Dim SqlJunk
'Create a connection odject
Set dbGlobalWeb = Server.CreateObject("ADODB.Connection")
'Database connection info and driver
rsGlobalWeb = "DRIVER={Microsoft Access Driver (*.mdb)};uid=; DBQ=" & Server.MapPath("\.....\database.mdb")
'Set an active connection to the Connection object
dbGlobalWeb.Open rsGlobalWeb
SqlJunk = "SELECT Start.StationName AS Start, Start.Time AS JourneyTime, Destination.StationName AS End FROM Station AS Start, Station AS End, Time AS JourneyTime WHERE Start.StationName LIKE '%" & $Start & "%' AND Destination.Station LIKE '%" & $End & "%' AND Start.Time > #" & $Statement & "#"
Set rsGlobalWeb = Server.CreateObject("ADODB.Recordset")
rsGlobalWeb.Open SqlJunk, dbGlobalWeb, 3
'Now I must display the results
<%=rsGlobalWeb("Start")%>
<%=rsGlobalWeb("JourneyTime")%>
<%=rsGlobalWeb("End")%>
%>
Damien
|
|
|
|
|
I want to create the aspx page which has to be the output for the html devices and wml devices.I am using MMIT for using the pages.
If anybody knows,pl answer.
|
|
|
|