|
I'm having the exact same problem....try as I might, I cannot get my CE application to provide a non-zero exit code. Did you find the solution for this problem?
Paul
|
|
|
|
|
No I did not. Instead, I have the application what was spawned create a file if it successfully terminates. Then I check for the existance (or absence) of this file to determine the program's status.
|
|
|
|
|
I was afraid of that. I was considering the same approach, but wanted to avoid it. I hate having files sitting around on a computer.
|
|
|
|
|
Hi
I am looking for help in writing a parsing / data mine function to extract information from a message received from a windows socket. An example of the message is
SLF {name cakjl} {Location 123, 123, 321} Rotation {0, 0, 0}
Where I want to extract the three number in the Location part of the message and place them in a
struct { int x, int y, int, z} etc...
I am converting the buffer to a large string and matching the letters SLF, but am wondering how to extract the numbers?? I also need to do this for other types of messages and am trying to come up with a generic way of extracting the information and formatting it so I can use it.
Any help would be greatly appreciated
Thanks
Martin
|
|
|
|
|
A fairly general approach is using regular expressions for doing the parsing. If you're into hardcore C++, check John Maddock's Boost Regex++ library.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I've created an icon using Microangelo 5.5 and I've inserted it into my application as the main icon. It also has an image for the standard, no alpha channel 32 x 32 icon, but the problem is that even on xp it shows this standard icon instead of the xp one. How do I get the xp icon to show up on xp?
Cheers,
swinefeaster
Check out Aephid Photokeeper, the powerful digital
photo album solution at www.aephid.com.
|
|
|
|
|
Main has caused an error in Main.exe
Main will now close.
if you continue to experience problems,
try restarting your computer.
my program works fine, but it runs once throw the error above?
|
|
|
|
|
In debug or release mode ? You're saying it does this the second time you run it ? Try running it in debug mode, and hit the debug button in the dialog to see where it crashes.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
I am doing a project on TAPI 3.0, as u know its Com based,,i ve just entered the project and facing some crutial problems while initializing TAPI.. I tried to get CLSId from "clsidfromProgiD",, with parameter1"TAPI3Lib.TAPI".. but it dosent give me any ID! When i checked this is VB,,, here it showss TAPI3Lib as a namespace and there it works properly,, but in VC it created poblems,, can u people tel me,, is there any way to find out the namespaceof TAPI3.dll,, cazi am failed here!!!
i need this for initializing TAPI object!
Actually... there is no such help for TAPI3.0 with VC++ on intenet.. so can u ps help me,,!
and if u ve worked in TAPI 3.0(VC++),, do tell me!
Email me at : af_raja@hotmail.com
A F Raja
AF Raja
|
|
|
|
|
MSDN section TAPI Quick Start provides you with several C++ code snippets and recommendations to get you started with TAPI.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
just wanted to say a big THANK YOU to all those that helped with my first.cpp
I really appreciate your help.
special thank to jon Sagara, Christian, kilowatt, Tim, Joaquin, jon hulatt,
lucy.
forgive me if I forgot anyone.
and sorry for posting the long long code again.
|
|
|
|
|
Hi all,
I have a trouble problem in Closing a modal window !!!
I load a modal window from here:
BOOL CMainDlg::OnInitialDialog()
{
.
.
.
CModalDlg wnd_m;
if(2 == wnd_m.DoModal()) MessageBox("Window is closed !!!");
.
.
.
}
Source code below is in a modal window:
void CModalDlg::OnOK()
{
.
.
.
if(a == 1) EndDialog(2);
MessageBox("Hi i'm here !!!");
if(a == 2) EndDialog(1);
.
.
.
}
Result is wonderful !!!
First my modal loads and when i hit OK button (a = 2), then window will close(by EndDialog(2)) ...
but the messagebox enables and show me "Hi i'm here !!!", WHY ???
I closed the window so why did the messagebox enable ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
if(a == 1){
EndDialog(2);
return;
}
MessageBox("Hi i'm here !!!");
if(a == 2){
EndDialog(1);
return;
} EndDialog instructs the framework to terminate the dialog after OnOK exits; it is not equivalent to a return sentence.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi all,
Can i create a Access 2000 database by using CDaoDatabase object ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
NO, but I remember a trick to use the ado of access 2000. May be in that way you can create a Access 2000 database, Ask to Christian Graus, that I believe that he remember the trick for use it...(He is on line at this moment...)
Best Regards...
At the source of every error which is blamed on the computer, you will find at least two human errors, including the error of blaming it on the computer
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Hi all,
Can i create a Access 2000 database by using CDaoDatabase object ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I have tried creating Access 2000 DB using CDaoDatabase using CDaoDatabase::Create(...) function.
Check MSDN for help.
U can access this created database very well.
Let me know if it helps.
Regards,
Y.Yamini Devi.
|
|
|
|
|
The Create() function is limit !
It can create a database with using of dbVersion30 which is Access 97 !!!
How can i solve it ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Where can I find something like the win32 help file that i get online? I don't have my VC++ cd anymore so I can't install the MSDN stuff. With all due respect though, I don't want to be told, look at the microsoft site cause quite frankly that site is of very little help to me. Thanks guys.
-AJ
I code, therefore I am
|
|
|
|
|
Do you know msdn.microsoft.com? It treasures all the MSDN stuff and provides a reasonable consulting UI.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
redneckCoder wrote:
With all due respect though, I don't want to be told, look at the microsoft site
redneckCoder wrote:
I don't have my VC++ cd anymore
With all due respect
1/ msdn.microsoft.com contains the same info ( well, a subset of the same info ) on the MSDN CD's.
2/ If you don't have the CD anymore, you don't have Visual C++, and you need to either buy a new one or download a free compiler like GCC.
Christian
I have come to clean zee pooollll. - Michael Martin Dec 30, 2001
Picture the daffodil. And while you do that, I'll be over here going through your stuff.
|
|
|
|
|
Download the .NET frameword SDK. Then you'll at least get the .NET documentation free of cost.
Try and get a copy of VS .NET beta 2.0
It comes with the beta of MSDN 7.0 [you might find that useful too]
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
I am trying to get the user input by going to DOS and doing this:
C:\>windows>programNAme<inpu.txt
when i="" test="" every="" case="" sparately="" they="" all="" work="" just="" fine="" but="" when="" put="" thing="" together,="" don't="" know="" what="" happens?=""
="" =""
please="" tell="" me="" how="" to="" get="" out="" of="" this="" loop,="" if="" you="" can't="" find="" is="" wrong="" will="" be="" stuck="" forever.
<\pre=""> //And Do whatever is necessary to process it
do
{
switch (ch)
{
//***********************************************************************************
case 'C':
{
cin>>tempST>>tempIV;
tempStock->setStockTicker(tempST);
tempStocks->binarySearch( tempStocks->getMyStocks, 0, 14, tempST);
cout<<ch<<" "<<tempstock-="">getStockTicker()<<" "<<tempstock->getInitialValue()<<endl;
="" }break;="" ***********************************************************************************
="" case="" 'b':
="" {
="" cin="">>tempSS>>tempST>>tempNS;
//Here starts my binary search again
int low =0, mid, high= 9;
while (low <= high)
{
mid = (low + high)/2;
// here i create a temporary investor to hold data of Buyer
Investor tempInvestor = tempInvestors->getInvestor(mid);
tempAB = tempInvestor.getAccountBalance(); //AccountBalance Of Buyer
if (strcmp(tempInvestor.getSocialSecurity(),tempSS ) < 0) //this comparison is correct
low = mid + 1;
else if (strcmp(tempInvestor.getSocialSecurity(),tempSS) > 0)
high= mid - 1;
}
// Here i'm performing another binary search to look for the
// specific stock that has that same stockTicker
int lo =0, mi, hi=14;
int tempStockPrice;
while (lo <= hi)
{
mi = (lo + hi)/2;
*tempStock = tempStocks->getStock(mi);
tempStockPrice = tempStock->getCurStockPrice(); // storing the stockprice in tempStockPrice
if (strcmp(tempStock->getStockTicker(),tempST) < 0)
lo = mi + 1;
else if (strcmp(tempStock->getStockTicker(),tempST ) > 0)
hi = mi - 1;
}
if ( tempAB >= (tempStockPrice * tempNS))
{
tempTickerShare->setNumOfShares(tempNS);
tempTickerShare->setTickerSymbol(tempST);
tempInvestor->addTickerShare(tempTickerShare);
}
cout<< ch<<endl; <<"="" "<<tempinvestor-="">getSocialSecurity()<<" "<<temptickershare->getTickerSymbol() <<" "<< tempTickerShare->getNumOfShares()<<endl;
}break;=""
="" ***********************************************************************************
="" case="" 's':
="" {
="" cin="">>tempSS>>tempST>>tempNS;
//Here starts my binary search again
int low =0, mid, high=9;
while (low <= high)
{
mid = (low + high)/2;
// here i create a temporary investor to hold data of Seller
*tempInvestor = tempInvestors->getInvestor(mid);
if (strcmp((*tempInvestor).getSocialSecurity(),tempSS ) < 0)
low = mid + 1;
else if (strcmp((*tempInvestor).getSocialSecurity(),tempSS ) > 0)
high= mid - 1;
}
int lo =0, mi, hi=14;
while (lo <= hi)
{
mi = (lo + hi)/2;
tempTickerShare = tempInvestors->getInvestor(mid).getTickerShare(mi);
if (strcmp (tempST , tempTickerShare->getTickerSymbol()) < 0)
lo = mi + 1;
else if (strcmp(tempST , tempTickerShare->getTickerSymbol())> 0)
hi = mi - 1;
}
//Here i check whether the investor has enough shares to sell
if (tempNS <= tempTickerShare->getNumOfShares())
{
tempNS = tempTickerShare->getNumOfShares() - tempNS;
tempTickerShare->setNumOfShares(tempNS);
}
else
cout<< "Sorry don't have enough shares to sell"<<endl;
="" }break;="" cout<<="" ch="" <<"="" "<<tempinvestor-="">getSocialSecurity()<<" "<<temptickershare->getTickerSymbol() <<" "<< tempTickerShare->getNumOfShares()<<endl;
default:
="" {
="" cout<<"end="" of="" file.="" "<<endl;
="" }="" break;
="" }
="" }while(!cin.eof());
=""
="" delete="" tempstock;
="" tempstocks;
="" tempinvestor;
="" tempinvestors;
="" temptickershare;
}
<\pre="">
Hint: you can find the whole code in C2664
the question that i just asked
|
|
|
|
|
Your code begins with:
do
{
switch (ch)
... So, where is the ch variable declared? A very suspicious thing is the fact that ch does not vary inside the loop, which is must likely a bug. I guess you need to store the first character of each line into ch .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
ch was declared out of the loop
if you look at my question below where you see "C2664"
you can re4ad the whole code.
|
|
|
|