|
Hi
I have debug manytime the northwinder sample of sql server compact edition 3.1 . and always got
error hr = -2147221164 {Class not registered }
at the time of creating instant of OLE DB provider
I have installes (SQLServerCE31-EN , SSCE31SDK-ENU, SSCEDeviceRuntime-ENU, SSCERuntime-ENU)in my system
this is my code sample
hr = CoCreateInstance( CLSID_SQLSERVERCE_3_0,
0,
CLSCTX_INPROC_SERVER,
IID_IDBInitialize,
(void**)&pIDBInitialize);
thnx
|
|
|
|
|
Hello All,
I got the error "Overlapped i/o operations in progress".Please let me know that what is the mistake??
I hardcode the second param of InternetOpenUrl to understand you what is the url type i am using.
void GetSuggestionList(LPCTSTR szURL)
{
DWORD dwError=0;
LPVOID lpMsgBuf;
TCHAR szBuf[80];
if (hInternetSession == NULL)
{
hInternetSession = InternetOpen(L"Microsoft Internet Explorer",
INTERNET_OPEN_TYPE_PRECONFIG,
NULL,
NULL,
INTERNET_FLAG_ASYNC);
if (hInternetSession != NULL)
{
InternetSetStatusCallback(hInternetSession,
(INTERNET_STATUS_CALLBACK)InternetCallbackFunction);
hURL = InternetOpenUrl(hInternetSession,
L"http://wioclite.webdunia.com",
NULL,
0,
INTERNET_FLAG_RELOAD |
INTERNET_FLAG_PRAGMA_NOCACHE |
INTERNET_FLAG_NO_CACHE_WRITE,
(unsigned long)(&request_context));
if(!hURL)
{
dwError = GetLastError();
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
dwError,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf,
0, NULL );
wsprintf(szBuf, L"%s failed with error %d: %s", szURL, dwError, lpMsgBuf);
MessageBox(NULL, szBuf, L"Error", MB_OK);
}
}
}
}
Thanks in Advance
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Hi,
but i have to do this.
I have a dialog resource and some controls (like edit,combo and button using drag and drop)
on dialog and i have to show this list view on dialog. actually after running program
whatever controls is displaying on dialog is also displaying on emulator. i have tried to
choose list view/datagrid or any control from com componet .after choosing it is displaying
in tool bar. but not able to drop on dialog.
so can i create list view using createwindow(.....)that will show on emulator with some
other controls
i am using
DialogBox(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), NULL, (DLGPROC)WndProc1); for showing
dialog on emulator by passing IDD_DIALOG1 as a dialog reasource and i want that this list
view/grid show on dialog.
I am using windowmobile 6 sdk. developing on desktop using vc++. windows applicayion
plz help.
thanx
|
|
|
|
|
|
Mmmm, is the word extern what you are looking for?
Globals.cpp
int globalInt = 0;
CString globalStr = "";
CMyDoc* myDoc = NULL;
other1.cpp
extern int globalInt;
globalInt = 3;
other2.cpp
extern int globalInt;
if (globalInt == 3)
AfxMessageBox ("GloballyModified");
else
AfxMessageBox ("not working");
Of course, other1.cpp should be executed before than other2.cpp
ADD:
I would use the Global.h to declare constants, all the includes that are going to be needed in all other modules, and things like that, but for variables I prefer it like above
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
thanks for the reply. I found my mistake. In one of my header files, I had included the #include "Globals.h" by mistake. So when that header file was used in my .cpp files I inadvertantly included Globals.h twice which gave me the redefinition errors. Thanks again for the reply
|
|
|
|
|
How to make variables to be global inside the whole application. he had declared the variables in a "Global.h" as public but he had problems to acces them from other places although the include Globals.h was made.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Why did you delete your message?
|
|
|
|
|
F*CK, are you stupid to delete your questions once you get the answers ?
this is a forum man, not a chat. that means that other newbies - yeah, like you - can search the forum if someone else already asked the same question.
but if you delete, how can one find back what the question was ?
moreover it's not that first time you do this, and I've already notified you about this.
so, please, never do that again !
modified on Friday, May 16, 2008 8:17 AM
|
|
|
|
|
Well, now you really need the rant icon, don't you?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I really don't understand why people are doing this. Am I missing something?
|
|
|
|
|
Michael Schubert wrote: Am I missing something?
morons brother... you can't fight against.
|
|
|
|
|
It seems that you got your answer and then delete your question,right!?
|
|
|
|
|
Hamid. wrote: It seems that you got your answer and then delete your question,right!?
Right :-#)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi Alok how are you you back to the codeproject but it seems you are front of time how did you accde to these replies?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
I want to read Japanese string from string table. Means string is stored in Japanese language in MFC.
Can any body help me out. I try with ::LoadString(hModule, IDS_STRING1002 , szTemp, sizeof(szTemp))
but it is giving ??????? ?????? .
|
|
|
|
|
|
|
Do you want to use of multilangues on your program?
|
|
|
|
|
Hamid. wrote: multilangues
What's one of those?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: What's one of those
New version of multilanguages.
|
|
|
|
|
yes, it can be a mutilingual program.
means String Table is going to contain japanese, Chines etc. that i have to load and print in message box.
|
|
|
|
|
I think this[^] article is helpfuls for you.
|
|
|
|
|
If you want to display the text in a MessageBox you have to use MessageBoxEx where you can (and have to) specify the language ID.
|
|
|
|
|
Does your program compile without a hiccup, but it displays question marks in place of Unicode characters? In that case, you just need to install the appropriate language in your computer. Go to Control panel -> Regional and language options -> "Check" Install files for East Asian languages. Restart your machine. That should be it.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|