Hi, I want to read a text in an excel file. I am using the folowing code. HRESULT hr; CLSID clsid; hr = CLSIDFromProgID(L"Excel.Application", &clsid); BOOL bRet = objApp.CreateDispatch(clsid); objBooks = objApp.GetWorkbooks(); objBooks.Open("C:\\tmp\\1.xls", VOptional, VOptional,VOptional,VOptional,VOptional, VOptional, VOptional, VOptional, VTrue, VFalse, VOptional, VOptional); It is working in a test applicaiton. But i am using the same code in my development project, CreateDispatch function gets failed. Anyone knows the reason? Thanks,
Pryabu
Posts
-
Excel Issue -
How can i get handle of edit controlok thanks
-
How can i get handle of edit controlyes.it is showing window handle. If i open the form in another machine,Will the window handle get change?
-
How can i get handle of edit controlsorry not in a web page... in oracle forms...
-
How can i get handle of edit controlHi, Im having a web application.It has a edit control.Using a service, i will continuously watch a file for some content, then i will post that content into the edit control. How can i get the handle of edit control in the web application? Is it possible? Thanks,
-
Loading dll in c++ok thanks
-
Loading dll in c++No.This dll is given by a vendor.This is not our dll.
-
Loading dll in c++Yes.I have used Dependency walker. But its showing only 4 functions DllCanUnLoadNow,DllGetClassObject,DllRegisterServer,DllUnregisterServer. But I can use the functions in .net. In c++ only, its not working.
-
Loading dll in c++Yeah,I have loaded the dll and its returning 0x11000000 value in HINSTANCE But while getting the address of that function,its returning value 0x00000000. Whats the reason? If we open a dll in notepad, it should contain the function names right? but this is dll is not showing any fn names in notepad. Please tell me why GetProcAdress is returning NULL value? Thanks,
-
Loading dll in c++Hi, How to check whether the dll can be loaded in c++? Thanks,
-
How to assign class variable value using loadlibrary functionThe dll is given by some vendor. Just im using that one. I cant define functions in dll.
-
How to assign class variable value using loadlibrary functionHi, Im using LoadLibrary function to load a dll.To call a function,we will use GetProcAddress.But how to assign a value to a variable in that dll. Can anyone pls help me? Thanks,
-
GetLastInputInfo errorI have included winuser.h
-
GetLastInputInfo errorHi all, To detect the application idle time,im using GetLastInputInfo function, but its not returning any values in the structure LASTINPUTINFO. It is showing the following error in Watch tool. But the program was build successfully. Error:symbol "li" not found. Im using the following code: LASTINPUTINFO li; li.cbSize = sizeof(LASTINPUTINFO); ::GetLastInputInfo(&li); Thanks,
-
Character ExceptionHi, Im having a LPSTR variable.I want to copy a string to this variable. The application is getting crashed while copying this string.I want to catch this exception.I have used exception class,but its not capturing that one.Please suggest me to do this.Im using the following code. LPSTR lpszstr; try { wsprintf(lpszstr,"%s","sdfsdfsd fsdfsdfsdf"); } catch (CException *why) { ::MessageBox(NULL,"test123","test",MB_OK); } Thanks,
-
try-catch exceptionnow the errors has gone.Can you please tell me how to get the error message. ni CExeception we are having GetErrorMessage() fn. Similarly, what is the fn in exception class to get the error message?
-
try-catch exceptionHi, my application is a win32 appln. I have added try-catch loop. But its showing the following error.Please help me to resolve this error. Code: try { fn(); } catch(CException exp) { exp->GetErrorMessage(lpszErr,sizeof(lpszErr),NULL); wsprintf(lpszLogMsg,"%s\\%s",lpszErr,"fn"); WriteLog(0,lpszLogMsg); return; } Error: error C2061: syntax error : identifier 'CException' error C2310: catch handlers must specify one type error C2227: left of '->GetErrorMessage' must point to class/struct/union error C2317: 'try' block starting on line '474' has no catch handlers
-
Exceptionin this link they have mentioned using exception function we can catch divide by zero error. please chk this link http://support.microsoft.com/kb/815662[^] Thanks,
-
Exceptionits not going to the catch block,after executing the i/j statment,the application is getting crashed.
-
ExceptionHi, I want to capture a exception. I used try catch but its not working.Im using the following code. Please suggest me. LPSTR szError; try { int i = 10; int j = 0; int k = i/j; } catch(CException *e) { e->GetErrorMessage(szError,200,NULL); } Thanks,