|
Maybe your dll needs to load other dlls and it cant,can you check your dll on other OS?
|
|
|
|
|
Copy the dll in the same folder than your application.
|
|
|
|
|
ya I have my dll in my same folder as my application
Ashish Bhatt
|
|
|
|
|
By the way I got solution by removing that dll project and once again add it to workspace. At present it is working nice. If I will get some problem then I will contact you later.
But I realy want to know the reason why this happened for my knowledge point of view.
Thanks to All.
Ashish Bhatt
|
|
|
|
|
You probably pasted your dll in the wrong directory. Remember, when you start your program from the IDE, the working directory is the one where your project file (.vcproj) is, not the folder where the exe is (in general, in the debug folder).
|
|
|
|
|
You should run a dependency check on your exe and your DLL. It should help you determine what other DLL's are required to load yours.
Get this utility: Dependency Walker[^]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
ashishbhatt wrote: This application has failed to start because VNCHooks.dll was not found.Re-installing the application may fix this problem.
try copying it with same folder as of executable
"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,
Im coding for MDI application. In that we include external keyboard(other that system keyboard)through port.My application is some process control based. My problem is
If i get any alarm in my applcation,then LED in my external keyboard should get blink. I dont how to code fro blinking.And i searched i didnot get the solution.Pls help me out.
I have various view in my application like alarm view,annunciator view etc.,
In external keyboard i have particular to see alrm view,annunciator view...
In that each button there is LED,if i get any alarm in alarm view,then LED in that button should glow.No need of blinking,only the LED should glow.IF get to Alrm view page and i will do some process and i will off the alarm.Then LED shold not stop glowing.
I need help for this only.
Anu
|
|
|
|
|
Hi!
I am using a imagelist with a toolbar and when I am trying to disable an image in the tool bar the image is getting completely faded (no image is being displayed but simply a complete gray section is being displayed). However I want the image to be displayed in a shaded mode (similar to a general disabled image). Is there anything I need to do this? I appreciate your quick help.
Thanks in advance.
Priya Sundar
|
|
|
|
|
I am having an object of my own custom class, I want to store it in some file and fetch back as and when required. I have tried to store object simply with CFile, but it is storing some junk values and not also giving correct values whatever i tried to store in it.
Please guide me in this matter, how could i accomplish it?
Hemang Raval
B.E. - I.T.
|
|
|
|
|
hai,
you didnt specify how you have attempted to store your object there. may be some snippet of code.
|
|
|
|
|
First thank you for considering my question.
I tried with following simple code:
<br />
<br />
MyObj * obj = new MyObj();<br />
obj->sharedObjectFunction((unsigned char*)recvBuff2, len);<br />
<br />
CFile file;<br />
file.Open(CString("d://TestFiles//RTMPServer//ClientToServer_msg3.txt"), CFile::modeCreate | CFile::modeWrite);<br />
file.Write(recvPack, SObj->packetCounter);<br />
file.Close();<br />
<br />
I want to store unsigned char* data returned to my object named obj in my case. i am simply writing that object to file. this code works fine with only unsigned char* dat .Now you tell me, Is it possible to write object in file with this code ?
Hemang Raval
|
|
|
|
|
Hemang Raval wrote: file.Write(recvPack, SObj->packetCounter);
here what is recvPack?
|
|
|
|
|
Actual code is like this. sorry I forgot to write about recvpack which is also unsigned char*.
<br />
<br />
MyObj * obj = new MyObj();<br />
recvpack = obj->sharedObjectFunction((unsigned char*)recvBuff2, len);<br />
<br />
CFile file;<br />
file.Open(CString("d://TestFiles//RTMPServer//ClientToServer_msg3.txt"), CFile::modeCreate | CFile::modeWrite);<br />
file.Write(recvPack, obj->packetCounter);<br />
file.Close();<br />
<br />
Hemang Raval
|
|
|
|
|
you have to answer these also.
1.what does obj->sharedObjectFunction return?
2.if it returns the data in unsigned char *, then what for recvbuff2 is?
3.have you tried by putting recvbuff2 in file.write and see?
i mean like this
file.Write(recvBuff2, obj->packetCounter);
4.and also in debug mode, see, which array is getting the data you actually wanted.
gud luck.
-- modified at 4:05 Friday 26th October, 2007
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
Use CArchive class. Read here[^] for more information.
Regards,
Paresh.
|
|
|
|
|
Hello Friends,
In one of my application I need to let use to select the directory. I am using File Open dialog for that. but that Only let user select File. Is there any Way I can use this to select the Directory
This is the code I am using.It Allows me to select *.exe File When Choose EXE in Files of Type in File Open Dialog. but Not able to select the Directoy when Select FOLDER Option.
void FileOpenDlg(WCHAR *Path)
{
OPENFILENAME ofn;
ofn.lStructSize = sizeof ( OPENFILENAME) ;
ofn.hwndOwner = hDlg ;
ofn.hInstance = NULL ;
ofn.lpstrFilter =_T("Application (*.Exe;*.avi) \0 *.Exe;*.avi\0 FOLDER \0 ") ;
ofn.lpstrCustomFilter = NULL ;
ofn.nMaxCustFilter = 0 ;
ofn.nFilterIndex = 1 ;
ofn.lpstrFile = Path ;
ofn.nMaxFile = MAX_PATH ;
ofn.lpstrFileTitle = NULL ;
ofn.nMaxFileTitle = MAX_PATH ;
ofn.lpstrInitialDir = NULL;
ofn.lpstrTitle = NULL ;
ofn.Flags = 0 ;
ofn.nFileOffset = 0 ;
ofn.nFileExtension = 0 ;
ofn.lpstrDefExt = NULL ;
ofn.lCustData = 0L ;
ofn.lpfnHook = NULL ;
ofn.lpTemplateName = NULL ;
GetOpenFileName(&ofn);
}
|
|
|
|
|
|
Use the followign code:
CString YourClassName::GetFolderName()
{
BROWSEINFO br;
CString title = "Select the folder to convert its files";
char buff[MAX_PATH];
br.hwndOwner = m_hWnd;
br.pidlRoot = NULL;
br.lParam = NULL;
br.lpfn = NULL;
br.lpszTitle =( (LPTSTR) ((LPCTSTR)title));
br.pszDisplayName =(LPTSTR) buff;
br.ulFlags = BIF_RETURNONLYFSDIRS;
LPITEMIDLIST item;
item = ::SHBrowseForFolder ( &br );
::SHGetPathFromIDList ( item, buff );
return buff;
}
Hoping that it will help you.
|
|
|
|
|
Anurag Gandhi wrote: LPITEMIDLIST item;
item = ::SHBrowseForFolder ( &br );
::SHGetPathFromIDList ( item, buff );
return buff;
You need to release the memory allocated for item after you get the path name. As the documentation for SHBrowseForFolder says:
The calling application is responsible for freeing the returned PIDL by using the Shell allocator's IMalloc::Free method. To retrieve a handle to that IMalloc interface, call SHGetMalloc.
LPMALLOC pMalloc;
SHGetMalloc (&pMalloc);
pMalloc->Free (item);
pMalloc->Release ();
Judy
|
|
|
|
|
Thanks for the correction Judy.
|
|
|
|
|
Note my reply to the code that Anurag gave you. Also, prior to using that code, you must have called CoInitialize or CoInitializeEx.
Judy
|
|
|
|
|
How can I find the EOF in a CFile. I've read text file as a CFile in a MFC application. I want to do some process on the file within the EOF file.
I appreciate your help all the time...
Eranga
|
|
|
|
|
can you explain a bit clearly?
|
|
|
|
|
Like this,
<br />
char buffer[5000] ;<br />
CFile ReadFile ;<br />
<br />
whiel(ReadFile is not reach to the end)<br />
{<br />
ReadFile.Read(buffer, 4) ;<br />
}<br />
I want to do it until the end of file. Is that clear.
I appreciate your help all the time...
Eranga
|
|
|
|