|
I think the problem is the with the path and the environment variables setting. i don't know how this can be done in .net but in vc++ we can do it by calling a bat fie Vcvars32.bat
|
|
|
|
|
I have Microsoft Windows XP DDK and the Microsoft Visual C++ compiler. When I try to compile a driver I get an error: compiler version not supported by the DDK. what should I do to be able to compile a driver with my compiler?
gabby
|
|
|
|
|
|
Hello,
I have written a COM addin in C++. I face a challenge of needing to send a message (much like pWnd->PostMessage(...) in CWnd) in the COM add in environment. Any way of achieving such effect?
thanks.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Hello,
How to enable and disable a device driver by using VC++ or BC++?
Could anyone can give me the sample code to enable and disable a driver such as netcard or audio card?
Thanks.
Joye
|
|
|
|
|
|
I have an INI file that contains following:
[CONG]
COL1;COL2;COL3;COL4
COL11;COL22:COL33;COL44
COL111;COL222;COL333;COL444
How can I read and populate a combobox or listbox as follows:
COL1
COL11
COL111
then when I select an item (COL1 for example) from the list, it will read the forth item in the INI
COL4
Any guidelines, direction or sample code will be greatly appreciated
|
|
|
|
|
forgot to mention using VC++6 with/without MFC
|
|
|
|
|
just tokenize it by using strtok, bear in mind however there are some issues on strtok. (check the MSDN)
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Why do you use .Ini file?
get the value into CString;
Find where are the ';', with CString.Find(";",0);
Get the string with CString.Mid
<italic>Work hard and a bit of luck is the key to success.
|
|
|
|
|
use the fgets() function to read each complete line into an array of char (or CString or whatever you use), then just trawl through it until you find a ';' character and set it to 0 or '\0'. Once you've done that add it the combo box and read in the next line...
"When I left you I was but the learner, now I am the master" - Darth Vader
|
|
|
|
|
Hello there,
I want to use a functionpointer to ReadFile and WriteFile in my program, but for some reason the code won^t compile correct. This is how I declare the function pointer:
BOOL (*pReadFile)(HANDLE , LPVOID , DWORD , LPDWORD , LPOVERLAPPED ); <br />
<br />
pReadFile = &ReadFile;
The compiler complains about:
error C2440: '=' : cannot convert from 'int (__stdcall *)(void *,void *,unsigned long,unsigned long *,struct _OVERLAPPED *)' to 'int (__cdecl *)(void *,void *,unsigned
so problem seems to be the __stdcall and __cdecl declarators.. Anyone knows how I should declare my function pointer in order for this to work???
Thanks for any advice,
Davy
|
|
|
|
|
ok , just placed the answer in my question myself it seems...`
I had allready tried to add the __stdcall in my pointer declaration, but put it after the *..
Answer to my question is:
declare pReadFile as:
BOOL (__stdcall*pReadFile)(HANDLE /*hFile*/, LPVOID /*lpBuffer*/, DWORD /*nNumberOfBytesToRead*/, LPDWORD /*lpNumberOfBytesRead*/, LPOVERLAPPED /*lpOverlapped*/);
But it would be nice if anyone might be able to tell me where that __cdecl and __stdcall come from...
Thx..
Davy
|
|
|
|
|
|
How to convert an .exe to .dll? I tried to add project>files to add .cpp and .h files. But when I compile it, I got an error "fatal error C1189: #error : include 'stdafx.h' before including this file for PCH"
Sorry if my question is too newbie, I cant find any solution in my VC++ reference book.
Thanks.
|
|
|
|
|
First you should make a project, which would make dlls, this option you would have to select, while making the project itself.
And when you write the .cpp files, the first #include should be #include stdafx.h, to avoid PCH (pre compiled headers) problems, then on you can include other header files.
And you would have to add some keywords with the functions you are exposing in the dll.
For this, refer to some dll examples.
- Shailesh
|
|
|
|
|
|
Hi
I have an view opened in my MDI application. And, after a execution of a specific process, the file which is viewed is modified. I want to refresh the view. How do i do that. Can someone please help me on this. I thank in advance.
Cheers
Mughi
|
|
|
|
|
UpdateAllviews(NULL);
<italic>Work hard and a bit of luck is the key to success.
|
|
|
|
|
I have tried this. But still, its not working. Where exactly should i implement this UpdateAllviews(NULL);
Sorry for the inconvenience.
thanx
mughi
|
|
|
|
|
Mughi wrote:
Where exactly should i implement this UpdateAllviews(NULL);
After finishing the process.
<italic>Work hard and a bit of luck is the key to success.
|
|
|
|
|
Thats true. But my code flow is like this.
All i have created is an MDI application of the following.
class CComputeApp : public CWinApp
class CComputeView : public CEditView
class CComputeDoc : public CDocument
1. I haven't coded anything on File open / save / close.
2. Everything is taken care automatically.
3. Imagine a file named compute.txt is opened in my application.
4. And after that, I run a process (thats a different class) from CComputeApp.
5. And the process returns a string (contains the filename).
6. Using the string, i call CDocument* CComputeApp::OpenDocumentFile(LPCTSTR lpszFileName) to open the file.
7. The problem is, if the file is already opened, this OpenDocumentFile method doesn't call CComputeDoc::OnOpenDocument(LPCTSTR lpszPathName).
8. And so, the view is not updated.
This is where my problem is. And thats why, i was curious about the place of code.
Sorry for all the frustrations. And hope that, i would overcome this problem.
Again, I thank in advance.
thanx
mughi
|
|
|
|
|
I hope i don`t get you wrong. I think I get the same problem with you before. I haven`t got the solution yet. I tried using CDocument::OnCloseDocument (if i`m not mistaken) and it close the application. I think we should code to call the File Close.
<italic>Work hard and a bit of luck is the key to success.
|
|
|
|
|
call Document's UpdateAllViews()
There is no spoon.
mail
|
|
|
|
|
Hi
U can call updateAllViews() which calls the update function which we have added.
I do hope this may help you.
Sujan
|
|
|
|