|
Thank you... that's 2 out of 4 now!
Joel Holdsworth
|
|
|
|
|
Hi,
When I am using _bstr_t variable (member variable) then I am getting Null Reference exception while destorying the class object.In that class,I am assigning different values to _bstr_t member variable.
When we are assigning different values to that variable do we need to allocate any memory for that variable explicitly before assigning the values to it. or else how can we solve this problem. Please give to me any suggestions
Thanks & regards,
Narasimharao
knarasimharao
|
|
|
|
|
Can you post some relevant code.How you are using the variables.
Did you try and debug your application?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Can you show some code ?
One possiblility is that, BSTR wrapped under it is freed already.
|
|
|
|
|
Hello everybody,
I would like to know how to get the color of the breakpoint circle, which visual C++ uses, when the user presses F9 to set a breakpoint?
Thanks,
Software Developer
Sanjay Khapre
|
|
|
|
|
I don't think there's any function to get that, but it's RGB( 128, 0, 0) (at least for VC6).
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Steve Echols wrote: but it's RGB( 128, 0, 0)
I found it to be RGB(132,0,0) in VS6.0 and VS .NET 2003
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hmmm, apparently it's configurable, according to WhiteSky's post. I'm setting mine to a nice mix of Yellow #5 and Red #2, the same Kraft uses for their macaroni and cheese.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I think its good 53,108,236 for breakpoint
|
|
|
|
|
if you want change color from breakpoint see
Tools->option->Enviroment->Fonts and Colors->Display items->Breakpoint*
|
|
|
|
|
I have written a code snippet which uses a CFile to read a txt file. The VC 6.0 environment is set for Unicode strings (Project Setting -> C/C++ -> UNICODE,_UNICODE). After I have read the complete txt file (using Read), I need to read it one line by one line. The problem is locating the end of line character in Unicode. Neither CFile nor CString offers support to find end of Line. Also after I read this contents into a CString, how do I get to end of line. When I try to use CString::Find(), even this does not work. Any leads..
|
|
|
|
|
|
have you thought using std::ifstream::getline() ?
|
|
|
|
|
Yeah I tried to use the NULL terminating char "\n" and "\r\n" and 0. None of this works. I need to get the remainder of the File contents by excluding the first line.
|
|
|
|
|
show off a piece of your code...
|
|
|
|
|
Sitaram Sukumar wrote: After I have read the complete txt file (using Read), I need to read it one line by one line.
Why are you reading the file twice?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hai all,
Does Anyone know how to compare two dates, and if one date is greater than other date can we find out number of days between them.
Is there any function or class that can do it automatically.
Pleas help me
Thanks in Advance
George K Jolly
|
|
|
|
|
|
Assuming you're using the COleDateTime in MFC you can subtract the 2 dates, which will return a COleDateTimeSpan object. Then you can use the GetDays function to see how many days the 2 dates span.
Like this:
COleDateTime date1(2006, 8, 28, 0, 0, 0);<br />
COleDateTime date2(2006, 8, 30, 0, 0, 0);<br />
<br />
COleDateTimeSpan span = date2 - date1;<br />
int numDays = span.GetDays();
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
|
Hi all,
I have a cab file.I need to add digital sign to it.
i followed the following steps( as mentioned in http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q247257[^]
but if i write signcode in commmand prompt ,i got an error like Signcode is not recognized as an internal command.Wat is the problem..
plz tell me how to assign digital sign to Cab file..
Thanks in Advance,
Sunita
|
|
|
|
|
signcode is part of the SDK and must be in your path for this to work. If using Visual Studio .NET 2003, run 'Visual Studio .NET 2003 Command Prompt' from Start, All Programs, Microsoft Visual Studio .NET 2003, Visual Studio .NET Tools.
If using VS 2005, the signcode tool has been replaced with the signtool program. Use Visual Studio 2005 Command Prompt to run this.
signtool is also part of the standalone Platform SDK.
|
|
|
|
|
Thanks for ur reply..
i have tried this signtool in vs2005..
A signtool signwizrd window opened.I refered my Cab file using browse..but its simply opening the folder of CAB(where i have set of DLLS) not refering any files.
PLz tell me wat is the problem in it..
Thanks in advance,
Sunita
|
|
|
|
|
The default filter of that Browse dialog is EXE, DLL and OCX files. Select 'Cabinet Files (*.cab)' from the 'Files of type' drop-down to pick your cab file.
Alternatively use signtool sign to specify the options on the command line.
|
|
|
|
|
I was wondering if there was a way to extend already allocated memory similar to what realloc() does. I know the operator new can be initialized with existing memory, but I have yet to find a way to make that memory grow.
char *tmp = new char [10];
strcpy(tmp,"hello");
char *tmp2 = new(tmp) char [20];
strcpy(tmp2,"Another string");
delete [] tmp;
This of course throws an exception because it's writing past the end of the array. Is there a way to do this without allocating, copying then deleting?
|
|
|
|