|
lavate malllik wrote: m_pFMApplicationv7->Release();
m_pFMApplicationv7 = NULL;
Release() returns a integer value. check it. It indicates reference count.
It must be 0 in your case.
If it is not , then it must be used some where after making it NULL
|
|
|
|
|
Hi
Thanks for your reply.
I had done debug & found the return value of release is "0".
Waiting for your reply.
Regards
Lavate Mallikarjun Avanna
|
|
|
|
|
Hi,
I'm using vc++ calling ras api RasGetEntryProperties(). I able to get the rasentry structure object and I'm facing problem in getting the alternate phone number.the documentation said the alternate numbers is a string append right after the rasentry structure.From the rasentry structure, i can get dwSize and dwAlternateOffset which will store the size(bytes) of the structure and offset point to the alternate number string respectively. but my problem is how to get the string using the rasentry or dwAlternateOffset?
|
|
|
|
|
why can't u try to get like
char szAlternatePhone[128];
strcpy(szAlternatePhone, *(rasStruct+offset));
hope it will work !
Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.
|
|
|
|
|
thanks for your reply. i still can't get it done.
i already email to your hotmail account. can help me to take a look on it?
thanks a lot.
|
|
|
|
|
Have you looked at the memory immediately following the RASENTRY structure to ensure that there are phone numbers there?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
hi all,
i am using a dialog based program.i have used an API ShellExecute() to extract a zip file and it is working properly.but i just want to put a condition that if that ShellExecute returns a success,then....
but return code of the ShellExecute is an HINSTANCE varaiable.and in MSDN they have written as return code as long variable.how can i know that function is a success or that .can anyone please give me some example how to use the return code of Shellexecute().
thaks in advance
lekshmi
|
|
|
|
|
From the docs:Return Values
Returns a value greater than 32 if successful, or an error value that is less than or equal to 32 otherwise. So just test the value to be > 32 to tell if it succeeded.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
The ShellExecute returns a value greater than 32 if successful, or an error value that is less than or equal to 32 .
HINSTANCE hInst = ShellExecute(...);<br />
if( 32 < hInst )<br />
{<br />
}<br />
else<br />
{<br />
}
|
|
|
|
|
hi
thank you for the reply.but it didnt works i got the folowing errors
error C2446: '<' : no conversion from 'struct HINSTANCE__ *' to 'const int'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
: error C2040: '<' : 'const int' differs in levels of indirection from 'struct HINSTANCE__ *'
Error executing cl.exe.
lekshmi
|
|
|
|
|
just type cast..
if( 32 < (int)hInst )
{
}
else
{
}
nave
|
|
|
|
|
Do like that
if (ShellExecute(...) > 32)<br />
{do somthing...}
I don't know if it works or not. But i hope it will.
If problem remains, let us know.
Good luck.
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Use:
HINSTANCE hInst = ShellExecute(...);
if (hInst > (HINSTANCE) HINSTANCE_ERROR)
{
...
} or
if ((int) hInst > HINSTANCE_ERROR)
{
...
}
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
hi
Thank you for the reply.im new to VC++ .can you please give some more detailed explanation.
i have used the shellexecute for extractig a zipfileand i just want whether it returns a success or..
thanks in advance
lekshmi
|
|
|
|
|
lekshmipriya wrote: can you please give some more detailed explanation.
Such as? Short of sitting down at your computer and typing it for you, I've shown you exactly what you need.
lekshmipriya wrote: i just want whether it returns a success or..
Which is exactly what I showed you. What is it that you are not understanding?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
i have some data ranged form 0 to 1,i want show these data in color map.
The function "img" in matlab is what i want.With help of this forum,i have solved the problem how to gradually change one assigned color to the other.Now I feel puzzled about this problem,take an example,
I use "0" to represent RGB (255,0,0) and use "1" to represent RGB(0,0,255);then other data values should represent what?How can i make these data gradually changed from RGB(255,0,0) to RGB(0,0,255)?
In fact,i can assgn "0" to repesent any color such as RGB (0,0,0) and so on,and "1"can represent any colors ,then make one color gradually change to the other.
-- modified at 22:46 Tuesday 25th April, 2006
|
|
|
|
|
It can be simply done as follows, but i don't know whether it will meet your need...
COLORREF rgb1 = RGB( 255, 0, 0 );
COLORREF rgb2 = RGB( 0, 0, 255 );
float fVal = 0.5;
int nR1 = GetRValue( rgb1 );
int nG1 = GetGValue( rgb1 );
int nB1 = GetBValue( rgb1 );
int nR2 = GetRValue( rgb2 );
int nG2 = GetGValue( rgb2 );
int nB2 = GetBValue( rgb2 );
int nR = nR1 + ( nR2 - nR1 ) * fVal;
int nG = nG1 + ( nG2 - nG1 ) * fVal;
int nB = nB1 + ( nB2 - nB1 ) * fVal;
COLORREF rgb = RGB( nR, nG, nB );
- NS -
|
|
|
|
|
When I change large arrays from 'float' to 'double' I got error message.
I need to use 'double' for six large arrays each has size [16200].
Please advise.
Thanks
-- modified at 22:10 Tuesday 25th April, 2006
|
|
|
|
|
I guess you asked the same question yesterday!
As they said dynamically allocate memory.
Nibu thomas
Software Developer
|
|
|
|
|
After changing to double the three large arrays I print out (thr last three column)looks like:
monitor# 1 sampling rate 0.0002441
0.0000 -1.#IO -1.#IO -1.#IO
0.0002 -1.#IO -1.#IO -1.#IO
0.0005 -1.#IO -1.#IO -1.#IO
0.0007 -1.#IO -1.#IO -1.#IO
.........
.........
|
|
|
|
|
mrby123 wrote: When I change large arrays from 'float' to 'double' I got error message.
Mind readers we are not. What is the exact error message?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Hi, I spawn a process to open 'rsh.exe' (c:\windows\system32\rsh.exe), and I'm trying to change the text that appears on the command prompt window title bar, by using this command from my calling function: 'this->SetWindowText("test")'.
This works in Visual Studio, but oddly, the same code brought over to Visual C++ .NET, does not work due to the 'this' pointer being null! Any suggestions on how to accomplish this?
Thanks
-- modified at 22:03 Tuesday 25th April, 2006
|
|
|
|
|
Have you used SetConsoleTitle ?
Nibu thomas
Software Developer
|
|
|
|
|
How to make a .OLB file in VC++?
Thanks in advance.
|
|
|
|
|
You guys have been a big help with my previous question, I have another.
I have input file "input.txt"
i have outputfile "output.txt"
input.txt will always look like
A 1 5 4
B 2 6 3
the first value can be a different, but will always be one char in length.
I want to grab each value on the first and second line and assign variables to them.
i've looked a lot about inFile.get or .getline or .peek, but it's not making a whole lot of sense.
I have this:
ifstream inf;
ofstream outf1;
ofstream outf2;
inf.open(argv[1], ios::in);
outf1.open(argv[2], ios::in);
outf2.open(argv[2], ios::out);
char n, x, y, z;
while(!inf.eof())
inf.get >> n >> x >> y >> z;
Can anyone shed any light?
Thanks,
Ed
|
|
|
|