|
Okiems. Thank you very much Owner drawn! I really appreciate your help.
waxie
|
|
|
|
|
Hi!
Can anyone point me to the solution of the following problem :
i want to retrieve information about the gfx card installed in the system (driver, driverversion, physical ram, chip type, etc) as well as information about other hardware-components and drivers.
For the display i currently use
INT cnt = 0;
FLAG ret = TRUE;
while (ret)
{
DISPLAY_DEVICE ddev;
ddev.cb = sizeof(DISPLAY_DEVICE);
ret = EnumDisplayDevices(NULL, cnt,&ddev,0);
if ((ret) && (!(ddev.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER)))
{ // no need for mirroring drivers (ex. netmeeting driver)
DEVMODE devMode;
devMode.dmSize = sizeof(DEVMODE);
EnumDisplaySettings(ddev.DeviceName,ENUM_CURRENT_SETTINGS,&devMode);
/*
Process device Info
*/
} // if (ret)
cnt++;
} // while (ret)
but the gathered information here is insufficient...
My application is a non-MFC application, so i am looking for plain SDK mechanisms
Thanks in advance
-- modified at 6:07 Friday 20th January, 2006
|
|
|
|
|
|
thanks a lot. that was the information i was missing
AmorphisOne
|
|
|
|
|
Hi everybody... I know there was an API function that called from a process will return you the path to where the EXE that launched the process is located. If called from a DLL it would return the path to where the EXE that loaded the DLL is located and if called from an EXE it would return the path to the EXE. But I forgot how it was named and couldn't find it on quick Google / MSDN searches. Can you please refresh my memory?
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
GetModuleFileName(...);
this is this.
|
|
|
|
|
Thank you! :- D. I remember now.
-= E C H Y S T T A S =-
The Greater Mind Balance
|
|
|
|
|
I have a problem with visual c++ V.6
Without the inline statement it works fine, with inline the compiler refuses creating code. Problem appears to be linked with "inline int CArray::getFw()"
Here´s a sniplet:
from CArray.h:
typedef int T;
class CArray
{
public:
CArray( int, T = 0);
int getFw();
void SetFeld( int, T );
T GetFeld( int);
T& operator[ ](int );
virtual ~CArray();
private:
int fw;
T* p;
};
from CArray.cpp:
....
inline int CArray::getFw()
{
return fw;
}
|
|
|
|
|
What's the exact error message ?
|
|
|
|
|
Since it´s a German installation it´s:
Generieren von Code...
Linker-Vorgang läuft...
Testprogramm.obj : error LNK2001: Nichtaufgeloestes externes Symbol "public: int __thiscall CArray::getFw(void)" (?getFw@CArray@@QAEHXZ)
Debug/Testprogramm.exe : fatal error LNK1120: 1 unaufgeloeste externe Verweise
Fehler beim Ausführen von link.exe.
Browse-Informationsdatei wird erstellt...
Testprogramm.exe - 2 Fehler, 0 Warnung(en)
|
|
|
|
|
Did you include the .cpp file of your CArray in the project ?
If yes, do you have the same error if you remove the inline keyword ?
|
|
|
|
|
Hi Cedric
the .cpp file is included and no, if I remove the inline keyword it works fine.
my main application is called "testprogram" and it´s .cpp file contains
#include <stdafx.h>
#include <conio.h>
#include <string.h>
#include <malloc.h>
#include <windows.h>
#include <wincon.h>
#include <assert.h>
#ifndef _ARRAY
#include "Array.h"
#endif
where array.h is the header file from CArray.cpp
|
|
|
|
|
I found the Problem:
MS Visual C needs inline methods to be defined in the .h file rather than in the .cpp file. I moved the inline method from .cpp to .h and now it works fine.
Odd
This tells the MSDN
Function Inlining
Mixing inline and non-inline compile options on different modules can cause problems. Consider the following example that has:
A library Test.lib with inline functions.
A header file containing the function prototypes for the library (Test.h).
An application App.exe, which is linking with Test.lib using the Test.h header file.
If Test.lib is created with function inlining turned on (/Ob1 or /Ob2), you will get an unresolved external error on any inline functions from Test.lib that are used in App.exe. The function's address is not in the PST for Test.lib because the functions were inlined inside the library. You need to either disable inlining (/Ob0) when building the library or place the inline function code in the header file (Test.h).
Similarly, a project that uses function inlining yet defines the functions in a source file rather than in the header file will also get this error. The header file is included everywhere deemed appropriate, but the functions are only inlined in the source file where they are defined. Therefore, the linker sees the functions as unresolved externals when used in other modules. For example:
-- modified at 7:06 Friday 20th January, 2006
|
|
|
|
|
Kamann wrote: Since it´s a German installation
since everyone here speak english, couldn't you traduce it ?
(ok, it is a LNK2001, so MSDN tells it is an Unresolved external symbol , but please be compliant too...)
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VCalc 3.0 soon...]
|
|
|
|
|
|
|
Hi Michael,
is this just Microsoft specific or in general ? Do other Compilers require the same ?
-- modified at 16:29 Saturday 21st January, 2006
|
|
|
|
|
|
how to deselect all the previous selected item in listctrl .
Bankey Khandelwal
Software Engineer
Solversa TechnologiesPvt.Ltd.
15,Yeshwant Nagar
Range Hill Road
Ganeshkhind,Pune-03
bankey.khandelwal@solversa.com
Mobile: +91-9850432990
Office : +91-20-25521888
|
|
|
|
|
|
|
|
I have a unicode app with a CEdit where I can display as well as paste japanese characters.
The problem is that the IME does not show Japanese as an option and, therefore, I cannot type japanese characters directly. How does one go about enabling an app to use IME?
I should say that my IME does have Japanese and it works fine with IE or Word.
Thank you all.
|
|
|
|
|
I am working with conversions, I am getting a integer value i want to convert to hexa decimal value.
|
|
|
|
|
Hum I think this is a very strange question because you don't have decimal values or hexadecimal values. The thing that is decimal or hexadecimal is the REPRESENTATION of the number (in a string or something like that). Your number is still stored the same in memory.
So now, what do you want to do exactly ? You have a string representing a number in hexadecimal and you want to convert that string into a string representing the number in decimal ? Or you have a number and you want to convert it into an hexadecimal string ? If yes, then use strtol (as pointed in one of the previous tread)
|
|
|
|