|
João Paulo Figueira wrote:
Try this:
TCHAR* pszFile = _T("\"\\Windows\\My Theme.tsk\""); // The theme file
Regards,
João Paulo
Worked like a charm!
Thanks,
-Eric
|
|
|
|
|
João Paulo Figueira wrote:
Try this:
TCHAR* pszFile = _T("\"\\Windows\\My Theme.tsk\""); // The theme file
This works great if I am personally entering the information in as a constant into the variable. The problem is that if I read in the path from a text file I can't get it to work.
In my text file I have \Windows\My Theme.tsk
I have also tried put in my text file the above text of "\"\\Windows\\My Theme.tsk\"" and it still won't change the theme.
How can I go about ensuring that the path is formated correctly before I put it into the registry? I have even tried running thru the path and adding the extra "\" characters and the extra '"' characters and it still did not work.
Thanks for the help.
-Eric
|
|
|
|
|
Can you please show me the code that you are using to add the quotes to the string?
Regards,
João Paulo
|
|
|
|
|
João Paulo Figueira wrote:
Can you please show me the code that you are using to add the quotes to the string?
Regards,
João Paulo
Ok,
Again the text in my text file is Today Theme=\My Documents\My Theme.tsk.
If I was going to do this without reading it in from the file I would have to format the string as such:
_T("\"\\My Documents\\My Theme.tsk\"");
Here is the code that I am using to attempt to format the string properly. I am getting the path then converting it to a CString so that I can do some other maniplutions to it.
"str" has the string value of "Today Theme" and tmp has a value of "Today Theme=\My Documents\My Theme.tsk".
I created the file on my desktop using Notepad so I am sure that the file is not Unicode and I wonder if that is having anything to do with this?
<br />
int nCount = str.GetLength() + 1;<br />
int nLineLength = tmp.GetLength();<br />
<br />
tmp1[0] = '\\';<br />
<br />
for(int i = nCount, j = 1; i < nLineLength; i++, j++)<br />
{<br />
if( tmp.GetAt(i) == '\\' )<br />
{<br />
tmp1[j] = '\\';<br />
j++;<br />
}<br />
<br />
tmp1[j] = tmp.GetAt(i);<br />
tmp1[j+1] = '\\';<br />
tmp1[j+2] = NULL;<br />
}<br />
Thanks for any insight you can provide.
-Eric
|
|
|
|
|
VanHlebar wrote:
I created the file on my desktop using Notepad so I am sure that the file is not Unicode and I wonder if that is having anything to do with this?
This is where I would look first. Use the Notepad encoding option on File / Save As... and choose Unicode.
Regards,
João Paulo
|
|
|
|
|
Has anyone successfully used the STUtil class to manage __try __Except handling in their embedded apps? I have installed it and it builds successfully, but if I try the following, my app still hangs:
__try
{
TCHAR *p=NULL;
int x = _tcslen(p);
}
__except(CATCH_COM_ERROR)
{
// handle the error
}
Souldn't the __except handler catch the error and let the app proceed?
|
|
|
|
|
I'm developping programs on wince using evc3.0
I made a new project using WCE ATL COM AppWizard with MFC support.I got no compile errors when i create a simple object.But when i create a full control or lite control,i got compile errors like this:
......error C2504: 'IBindStatusCallback' : base class undefined
......error C2061: syntax error : identifier 'IBinding'
......
the same project under vc6.0 i got no problem.I knew there are many limitations in evc.Does my problem stands for "mfc and atl won't cooperate with each other under wce?"
i have struggled on this problem for one day. i'm too tired now.
But i need to use CInternetSession class(MFC class) in my ATL COM Control(full control) project. Anybody can give me a hand?
Thanks a lot!
|
|
|
|
|
Hi all,
I'm using eVC 3.0. There is a linker error popping up when I try to convert string to BSTR. I can find its declaration under \Embedded Tools 3.0\wce300\Pocket PC 2002\atl\Include\COMUTIL.H. Which library do I have to include to get rid of the same, since COMSUPP.LIB is not supported by eVC 3.0 ?
Regards,
Amit
|
|
|
|
|
My guess is that because ConvertStringToBSTR uses char* instead of TCHAR* , it is not supported under Windows CE. To achieve the same effect, take a look at _bstr_t and CComBSTR .
Regards,
João Paulo
|
|
|
|
|
First this is what I am trying to achieve.
I want a single checkbox and a textbox. If the checkbox is checked (selected) I want the textbox to instantly become invisible or read-only. If the checkbox is un-checked I want the textbox to be visible and writable.
The environment is ASP.NET mobile controls i.e. a browser on a mobile phone, PDA, etc. Ideally I don’t want to postback when the checkbox is selected. I assume I need a SelectionList to create a checkbox but where do I go from there?
Thanks.
John.
|
|
|
|
|
Is it possible to develop mobile application on
Symbian OS for enabling bluetooth Internet bridge via LAN Access
Profile e.g. Point-to-Point Protocol(PPP) over RFCOMM?
Any guideline or Example?
|
|
|
|
|
Hi all,
I am using ADOCE. My requirement is to open a connection to a database (Test.sdf) in the Pocket PC. The problem is _Connection::Open throws an exception "File not found" even though I am giving the right path. My question is, What is the exact format format in which the connection string has to be passed to the _Connection::Open() function ?
Any help would be appreciated.
Regards,
Amit
|
|
|
|
|
From the adoce31.tlh file (generated using the #import directive, we can read the method prototype as:
HRESULT Open (
_bstr_t ConnectionString,
_bstr_t UserID,
_bstr_t Password,
long Options );
All parameters are optional. The ConnectionString parameter states the connection string(that can be optionally set via PutConnectionString ) has a very specific format. For "Pocket Access" databases, use Data Source=\\FolderName\\DbName.cdb . Top open SQL CE databases, use:
_Connection::PutProvider(_T("Microsoft.SQLSERVER.OLEDB.CE.2.0"));
_Connection::Open(_T("Data Source=\\FolderName\\DbName.cdb"));
You can optionally do everything in one step:
Open(_T("Provider=Microsoft.SQLSERVER.OLEDB.CE.2.0;Data Source=\\FolderName\\DbName.cdb"));
Regards,
João Paulo
|
|
|
|
|
Hi,
I am giving the connection string as "Data Source = history.sdf" but still the same problem persists. Could this be because this format is only applicable for *.cdb file and not *.sdf ? I am having Test.sdf on my pocket PC as the query analyzer gave only one option (SDF) while creating the database.
Many thanks for your reply.
Regards,
Amit
|
|
|
|
|
Use a full path name on the connection string. The Pocket PC does not allow for relative path names, nor does it recognize a current directory. Check my samples: they all start with a '\'.
Regards,
João Paulo
|
|
|
|
|
Hi there João,
I have tried giving "Data Source = \\history.sdf" and have ensured that this file is present in the root directory (listed as "My Device" as seen from the file explorer in the pocket PC). Still the same problem persists. Could there be any thing else I can try ?
Regards,
Amit
|
|
|
|
|
If you did set the correct provider, I can only guess that the file is corrupted. Use the SQL CE query analyzer to open the database file and browse it.
Regards,
João Paulo
|
|
|
|
|
Hi João,
I'm really sorry for the inconvenience I'm causing you with this. Please bear with me. Now after a lot of hardcoding it is finally working. The problem was with the parameter passing.
My actual requirement is to create a number of connections to the database in the beginning itself and store them in an array so they can be used by a no. of threads. At present, after creating the first connection, when it attempts to create another, _Connection::Open() throws the exception "Cannot create a file when that file already exists". Is there some restriction with ADOCE ?
Regards,
Amit
|
|
|
|
|
Hi all,
I am developing an application using eVC4.0. I'm getting a linker error saying "error LNK2001: unresolved external symbol "class _variant_t vtMissing ". In one section of MSDN, I found that vtMissing is supplied by #import . I have imported arm\adoce31.dll. Do I need to include any other library also ??
Regards,
Amit
|
|
|
|
|
I just realised...the adoce31.dll I am using is located is located under "Embedded Tools 3.0" directory and not the "Windows CE Tools" which comes with eVC4.0. There is no separate adoce31.dll with eVC 4.0. Could that be a reason ?
|
|
|
|
|
Hi,
I'm developing an application on embedded VC, I'm getting these linker errors when building.
FinalHookDlg.obj : error LNK2019: unresolved external symbol __imp_fnOrig referenced in function "public: void __cdecl CFinalHookDlg::OnRun(void)" (?OnRun@CFinalHookDlg@@QAAXXZ)
FinalHookDlg.obj : error LNK2019: unresolved external symbol __imp_fnDup referenced in function "public: void __cdecl CFinalHookDlg::OnHook(void)" (?OnHook@CFinalHookDlg@@QAAXXZ)
ModuleInstance.obj : error LNK2001: unresolved external symbol "public: __cdecl std::exception::exception(class exception::exception const &)" (??0exception@std@@QAA@ABV01@@Z)
ModuleInstance.obj : error LNK2001: unresolved external symbol "const type_info::`vftable'" (??_7type_info@@6B@)
ModuleInstance.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl std::exception::~exception(void)" (??1exception@std@@UAA@XZ) referenced in function "public: virtual __cdecl std::logic_error::~logic_error(void)" (??1logic_erro
r@std@@UAA@XZ)
ModuleInstance.obj : error LNK2019: unresolved external symbol "public: __cdecl std::exception::exception(char const *)" (??0exception@std@@QAA@PBD@Z) referenced in function "public: __cdecl std::logic_error::logic_error(class logic_error::basic_str
ing<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??0logic_error@std@@QAA@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@1@@Z)
MIPSII_FPDbg/FinalHook.exe : fatal error LNK1120: 12 unresolved externals
Error executing link.exe.
.... and some more are there.... not pasting here since it'll make this msg very long...
Could anyone help me in solving these?
I'm using one function, which is defined in a LIB. I included that .lib and the corresponding .dll file in my project and also gave the 'path' in 'Tools -> Options -> Directories'.
Still I'm getting the error,
FinalHookDlg.obj : error LNK2019: unresolved external symbol __imp_fnOrig referenced in function "public: void __cdecl CFinalHookDlg::OnRun(void)" (?OnRun@CFinalHookDlg@@QAAXXZ)
here, fnOrig function is inside a .lib file.
i gave the statement,
extern "C" __declspec(dllimport) void fnOrig();
before i called this function...
there is no compiler error... but it's giving linker error...
and one more thing... that is .... the same code compiled and executed in normal VC++. (Windows NT / 2k)
but.. here in WinCE, it's giving these problem..
can anyone help me...?
thanks in advance..
Regards,
Jinoj
|
|
|
|
|
In the project settings (Alt+F7), you have to explicitly state the library name on the Linker tab.
Regards,
João Paulo
|
|
|
|
|
I make soft for smartphone in evc4.
And it has not a customer wizard application,I can not make a awx file for my IDE.How could I do this?
lost my way
|
|
|
|
|
Are there any secrets, gotchas, CE bugs, or any other minutia I should be aware of before I try to create a modelss dialog box on PocketPC2002?
------- 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
"You won't like me when I'm angry..." - Dr. Bruce Banner
Please review the Legal Disclaimer in my bio.
------- signature ends
|
|
|
|
|
Hello all,
My requirement is to be able to update my SQL server DB once I connect the Pocket PC to the workstation. When I select "Export Database Tables" from the ActiveSync menu, it lists out some default tables on the PocketPC. I am not able to see my tables on the same. Any help would be greatly appreciated.
Thanks in advance.
Regards,
nigs_krec
|
|
|
|