|
Check the working directory within VS. The DLLs must be in there.
Generally when an application looks for its DLLs it start by looking in:
* The working directory.
* The windows directory.
* The windows system directory.
You can either create a shortcut so that the working directory is the same. Build the application into the appropriate working directory or move/copy the DLLs the applictaion needs into its working (DEBUG) directory.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
When I import 32 bit icons into the resources, VS.NET removes the alpha layer from the 32x32 icon, thus making it into a 24 bit icon. Is there any way to make VS.NET stop doing that?
The only workaround I know so far is to add the icon resources manually by editing the .rc as a text file.
--
...Coca Cola, sometimes war...
|
|
|
|
|
I know how to change it by manually changing the control pad settings.
But what i want to know is how to change the settings in my programm.How?
please contact:
max_xiayi@hotmail.com
|
|
|
|
|
Hi, I have done it, you must use DirectSound API and enumerate your sound card devices, then you can use their GUIDs to select each one separately.
I will take my program in codeproject as soon as possible.
|
|
|
|
|
Hi,can u send the program to me directly at xiayi@ustc.edu or max_xiayi@hotmail.com?
It is urgent for me.Thanks a lot.
please contact:
max_xiayi@hotmail.com
|
|
|
|
|
I know how to change it by manually changing the control pad settings.
But what i want to know is change the settings in my programm.How?
please contact:
max_xiayi@hotmail.com
|
|
|
|
|
Hi
I have a problem where I want to retrieve data from an ASCII file(containing grid points) an sort it into another file(in this case VTK file format). The thing is that my source file contains alot of text and I want to be able to jump to a certain place for instance "Number of points = ". I have not found a suitable way to adress this problem. I know how to go to a certain position using the usuall operators fstream and so on where I only can go to a specif position. I have looked around but found nothing. Would be grateful for any help!
/M
|
|
|
|
|
Why you've not given the input file format? If you provide think it will be easier to answer your question.
Tomorrow is a blank page
Let me know if I am wrong with the information above
|
|
|
|
|
Thanks for pointing that out Manir.
The file is from a preprocessor called NASTRAN(Fintite Element calculations on mesh). It's a file in ASCII format called f06.
|
|
|
|
|
I am not sure if I really have understood your problem. But if you are trying to go to a location containing a predefined string you can use Knuth-Moris-Patt method to find it from a stream.
Tomorrow is a blank page
Please let me know if I am wrong with above information
|
|
|
|
|
Hello !
I need to know all the available COM ports on my computer. How can I do that ? Is it a function for doing that ?
Thanks
|
|
|
|
|
here is small code snippet,i found it from CSerrailPort clas at CP
// prepare port strings
sprintf(szPort, "COM%d", portnr);
sprintf(szBaud, "baud=%d parity=%c data=%d stop=%d", 19200, 'N', 8,1);
// get a handle to the port
m_hComm = CreateFile(szPort, // communication port string (COMX)
GENERIC_READ | GENERIC_WRITE, // read/write types
0, // comm devices must be opened with exclusive access
NULL, // no security attributes
OPEN_EXISTING, // comm devices must use OPEN_EXISTING
FILE_FLAG_OVERLAPPED, // Async I/O
0); // template must be 0 for comm devices
if (m_hComm == INVALID_HANDLE_VALUE)
{
// port not found
delete [] szPort;
delete [] szBaud;
return FALSE;
}
-----------------------------
"I Think It will Work"
Formerly Known As "Alok The Programmer" at CP
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hi !
Thanks for your response but this is not what I'm looking for. I don't want to open every port to test if it exists. I'm lloking for a function (or maybe something in the registry ?) that gives me all the ports available on my machine.
|
|
|
|
|
You can detect all installed com ports by looking in the registry under HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM"
Forever Developing
|
|
|
|
|
Not sure if this will help but if you look in the registry
HKLM\SYSTEM\CurrentControlSet\Services\Serial\Enum
Gives a list of serial devices and a count!?
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
I think I've found another key that may help me:
HKEY_LOCAL_MACHINE\Hardware\deviceMap\SerialCOMM
and there is a list of (I think) all the serial port of my machine (virtual or not). Do you think this is a valid key (present on all computers) ?
Know, I want to retrieve the names (COM1, COM3, ...) but I don't know how to do this ? I can retrieve the number of 'values' but how can I retrive their values (I don't know the names of these keys...)
Any idea ?
Thanks
|
|
|
|
|
You can enumerate the registry by using
RegEnumValue
Check you local MSDN help files for more info
Forever Developing
|
|
|
|
|
Ok thanks, I will take a look.
This is the first time I use the registry so if you can point me to an article or something that describes how to use it correctly that would be nice
(In the MSDN, there is no doc about that, just the different functions and what they do )
|
|
|
|
|
Here is a code project artical on the subject
http://www.codeproject.com/useritems/serial_portsenum_fifo.asp
Forever Developing
|
|
|
|
|
Yup, they are available on Win2003, XP and W2K at least.
It appears that the names of the keys will be \Device\Serial<n>
where <n> is a number from 0 upwards! If you read the number of devices from the Enum of the serial section (as i described above) then you could loop round reading the device map names as you have found (altering <n> for each iteration of the loop).
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hi Friends,
What is the difference between global variable & static global variable?
Consider C and C++ .
VikramS
|
|
|
|
|
vikrams wrote:
What is the difference between global variable & static global variable?
I never knew there was one...or that anyone would use the static modifier on a global variable.
How do I print my voice mail?
|
|
|
|
|
hm.. as I remember, if you use static on a global variable, it is only visible in this single cpp file for the linker.
|
|
|
|
|
Hello Vikrams,
A global variable and a static global variable are both global variables. That is, they are not defined in the context of any C++ class. Examples :
int g_int = 0;
static int g_static_int = 0;
The difference between a global variable and a static global variable is that the global variable can be accessed in any CPP file while the static global variable can only be accessed within the CPP file in which it is defined.
Example :
source1.cpp :
int g_int = 0;
static int g_static_int = 0;
void func1()
{
...
g_int = 20; // OK !
...
}
void func2()
{
...
g_static_int = 35; // OK !
...
}
source2.cpp :
extern int g_int;
extern int g_static_int;
void func3()
{
...
g_int = 81; // OK !
...
}
void func4()
{
...
g_static_int = 19; // Not OK ! You will get a linking error.
...
}
-Bio.
|
|
|
|
|
Well.. I got it. Thanx a lot.
VikramS
|
|
|
|