all groups > visual c > august 2005
Filter by week: 1 2 3 4 5
HashTable -- ContainsKey returns False, but can't add item
Posted by Daniel Wilson at 8/31/2005 9:54:27 AM
LaborPool *Simulator::Controller::GetLaborPool(int LaborPoolID){
if (LaborPools->ContainsKey(__box(LaborPoolID))){
return dynamic_cast<LaborPool =
*>(LaborPools->Item[__box(LaborPoolID)]);
} else {
try {
LaborPool *newLP =3D new LaborPool(UltimateP... more >>
C++ Multi-Dimensional Pointer
Posted by varunhome NO[at]SPAM gmail.com at 8/31/2005 3:47:30 AM
Hi,
I have written an article declaring and using multi-dimensional
pointers in C++. The article tries to address many of the issues
related to multi-dimensional pointers.
Article link:
http://www.geocities.com/varunhostel/TechnicalArticles/PointerArticle/PointerArticle_Intro.html
Some of ... more >>
Testing custom VC++ parser
Posted by Jacek at 8/31/2005 12:00:00 AM
Hi All!
Currently I am in testing phase of developed by me in C# parser for ISO C++
and hopefully providing full support for VC++ as well. Unfortunately
preprocessor has to be off now so for tests I use files preprocessed with /P
option set on cl.exe command line.
Despite the fact that p... more >>
Return value changed.
Posted by EHuq at 8/30/2005 11:31:30 PM
I have 2 modules, I am using .net dialog for user interface and unmanaged c++
for library. In library, I have a function that returns true or false. If I
call the function from managed code, I am getting true though the function is
returning false. The return value is changing.. am I missing s... more >>
VB6 ActiveX Dll
Posted by Dan at 8/30/2005 11:20:03 AM
Good Day All,
I have an ActiveX DLL written in VB6. It defines a COM interface.
I need to be able to use this interface in C++. However, since I don't have
a header file I am not sure how to reference it. I have the lib file and the
exp file created when the dll is compiled in VB6.
I tr... more >>
[NSDictionary DictionaryWithContentsOfFile] question
Posted by Lloyd Dupont at 8/30/2005 12:00:00 AM
does '[NSDictionary DictionaryWithContentsOfFile]' support XML list format?
or only the old {} () format?
... more >>
SocketFlags.None does not work
Posted by Hasan O at 8/30/2005 12:00:00 AM
Hi ,
maybe it is not the right place to ask .
Hi , i have problem about sending data over socket . It waits for another
socket.send
// str = Encoding.ASCII.GetBytes("hello");
socket.Send(str,0,str.Length,SocketFlags.None);
socket.Receive(strincome,0,socket.Available,SocketFlags.None); ... more >>
Bluetooth and COM port emulation
Posted by Nathan Young at 8/30/2005 12:00:00 AM
Hello. I have a .net application that utilizes COM ports to
communicate with serial devices (namely a GPS).
This may not be the right group for this question, but bear with me as
I am not sure where else to ask. (I would appreciate any NG
pointers).
Anyway, my application uses CreateFile ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
typename
Posted by Staffan Langin at 8/29/2005 12:00:00 AM
Hello,
In the following code-snippet,
template<class Base>
class Foo : public Base
{
typedef typename Base::Type Type; //1
Type FooBar();
};
template<class Base> typename Foo<Base>::Type //2
Foo<Base>::FooBar()
{
return 0;
}
struct Bar {typedef int Type;}... more >>
HOW: Copy files in network with authentication ??
Posted by Kristijan Marin at 8/29/2005 12:00:00 AM
Hi,
Does anyone know how to copy files inside network from mashine one to
mashine2
if the mashine2 requires user/pass authentication ??
I need this for Windows platform.
Anyone did that ?
Thaks.
... more >>
Problem converting managed array (C++) to C# array
Posted by Dick Swager at 8/28/2005 6:51:03 PM
The following code is from a solution with a C++ project and a C# project.
The C++ project creates a managed array and the C# project tries to use it.
But I am having a 'System.ValueType[]' to 'System.Drawing.Point[]'
conversion problem in the C# project. How is this supposed to be done?
-... more >>
KillTimer() has not been after destroying the CWnd.
Posted by lauch2 at 8/28/2005 6:47:01 PM
hi,
I have CView inherited class. After creating the window, I call SetTimer( ,
, NULL) to set a periodical timer. When the window is no longer need, I just
call DestroyWindow() to destroy the window but without calling KillTimer() to
kill timer. Is this code safe?
Thanks in advance.
... more >>
Using Win32 in .Net
Posted by A. Dude at 8/28/2005 4:40:03 PM
This may be a stupid question, but if I create a Win32 project using VC++
7.x, will it build the same as VC++ 6 or will it be a .Net app?... more >>
#import
Posted by perspolis at 8/28/2005 12:00:00 AM
Hi all
I want to use an Activex dll that has written with vb.
I use @import to imprt that..I don't have any errors at compile time..
but at run time I get an error..
How can I use a dll in my application..
I'm using and Win application without using MFC.
thanks in advance
... more >>
Wich way I can to write a content of a string from CString-type object to a previsioly opened file?
Posted by Igor Natachanny at 8/28/2005 12:00:00 AM
HOW: SSL/SSH connection ??
Posted by Kristijan Marin at 8/26/2005 11:52:58 AM
Hi,
I have a project to do, that has to transfer files over SSL/SSH
connection.(FTP over SSL or some other method)
I searched a lot but didn't find anything usefull :((
Has anyone any clues how to do that ??
Thank you.
Kris
... more >>
CompileAssemblyFromSource() throws a "not implemented" exception
Posted by Brian C. Barnes at 8/26/2005 8:36:09 AM
Using the June CTP of VS2005
I have code that loads a script, and based on the extension, creates the
appropriate CodeDom provider and calls the CompileAssemblyFromSource()
function.
This works fine with C#, J#, JScript, and VB, but if I pass it a ".h" file,
so that the CppCodeProvider i... more >>
Formating a string using sprintf and showing it in MessageBox!
Posted by babak at 8/26/2005 1:57:16 AM
Hi everyone
I want to format a string (using sprintf) and put it in a messagebox
but however I try to do it, it doesn't seem to work.
Here is an example sample of what i try to do:
char msg[120];
string my_name = "John";
sprintf (msg, "My name is: %s ", my_name);
MessageBox(NULL, msg, NUL... more >>
For those interested in all .NET languages, not just C++...
Posted by James at 8/26/2005 1:18:28 AM
Hey guys,
I found a group that includes all the .NET languages, not just VC++.
It's a good idea, because when you go on to ask a question, you might
see a question about C#, for example, that you too are unsure of. I've
joined.
URL: dotnet-fanatics@googlegroups.com
James
... more >>
What happen if delete a CWnd without calling CWnd::DestroyWindow()
Posted by lauch2 at 8/26/2005 12:30:02 AM
After performing the following steps, what happen to my application or the
system:
1. My application has a class, namely CMyWnd, which is inherited from CWnd.
2. Instantiate a CMyWnd object by: CMyWnd* pMyWnd = new CMyWnd(...).
3. Call pMyWnd->CreateEx(...) to create the window.
4. (**DO NOT p... more >>
Debug problems with Visual C++ 6.0
Posted by Polvere NO[at]SPAM Lab at 8/26/2005 12:00:00 AM
Hello everybody,
I'm experiencing a problem during debug with Microsoft Visual C++: wherever
I set a breakpoint (and even if I disable all breakpoints) the debugger
goes into disassembler mode, and it stops at the same line, returning a
dialog windows that says: "user breakpoint called from c... more >>
File version
Posted by Paul at 8/25/2005 4:22:03 PM
Hi,
Does anyone know how to check a version of a file in C++? Any WIN32 API
that does this?
Please advice, thanks!
-P... more >>
Intended behavior or bug -- VC 2005 Beta 2
Posted by George Poulose at 8/25/2005 12:18:39 PM
#include <string>
using namespace std;
{
const string s("George");
char* p = const_cast<char*>(s.c_str());
strcpy_s(p, s.length(), "John");
}
Thanks.
George
... more >>
There must be a way to garbage collect pointer to pointers in mana
Posted by Nick Samia at 8/25/2005 12:18:10 PM
My problem is I am trying to migrate code from Version 6.0 C++ to C++ .NET
managed code and cannot figure out the __gc syntax for a pointer to an array
of pointers.
In C++ I can declare an object pointer type to an array of object pointers
like this.
In my .h file I declare
CAssemFloat **... more >>
Is it possible to monitor the execution of another application?
Posted by Lars at 8/25/2005 11:17:30 AM
I want to write a program that reacts on changes in another
application. Is it possible to get a copy of (some of) the messages it
recieves?
Another approach is to watch for changes on the screen. Is that
possible? If so - is it possible to define an area to watch?
I'm completely new to windo... more >>
MFC or.NET
Posted by Kenroy at 8/25/2005 5:49:37 AM
I am making a new application (server) which will beserving about 10,000
peopleand i would like to know if .NET is ssuitable language to make this
server .
Iwas thinking about making it inC++ with the winsock2 API and use MFC to
make the client.
Also i would like to know if MFC is suitable t... more >>
My ActiveX control won't show in MFC App
Posted by Naeem Sarfraz at 8/25/2005 3:16:03 AM
Platform: VS.Net, Unmanaged MFC C++ Application
I used the "Add Class -> MFC -> MFC Class From ActiveX Control" wizard to
generate a class for my charting control. Now I'm attempting to add the
control to my MFC application.
I can instantiate the control but it won't show in the CView wind... more >>
accessing string buffer posessed by System::String class directly?
Posted by Bae,Hyun-jik at 8/25/2005 12:00:00 AM
Hi,
My managed C++ library frequently takes LPCTSTR from managed exe. Due to the
fact that my library doesn't modify string buffer if its parameter type is
LPCTSTR, it won't be required to copy text data from System::String to
another buffer memory, however, I couldn't find how to let my li... more >>
Compiling loki with VC 7.1
Posted by Alfonso Morra at 8/24/2005 11:55:30 PM
Anyone knows what version this flag:
_MSC_VER
evaluates to ?. Trying to decide which headers to use to compile loki
... more >>
Beta2 can't catch exceptions?
Posted by Tamas Demjen at 8/24/2005 5:26:46 PM
I was shocked to learn that VC++ 2005 Beta 2 can't catch Access
Violation exceptions in unmanaged code.
To reproduce this, I created a minimal Win32 console application:
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
int* p = 0;
try
{
*p = 0;
}
... more >>
COM or .NET
Posted by Kenroy at 8/24/2005 2:47:33 PM
is COM used widely nowadys or is .NET the best thing to use nowadys?if yes
what type of applications is COM mainly used for developing?
what type of applications .NET not suitable for?
... more >>
Managed C++ exe =to=> Managed C++ DLL
Posted by Lloyd Dupont at 8/24/2005 12:00:00 AM
Now I have finally wrapp all my feature the way I want to have them, and I
was thinking to starting agin on my C# roject with my my ManagedC ++ code as
a DLL.
I added my Managed C++ exe/project to the C# solution
I removed the files contining the main() (no need for them in a DLL)
I changed... more >>
IF Statements
Posted by Chuck831 at 8/23/2005 11:46:34 AM
Hi, I'm still new to C# and haven't been able to find an solution to an IF
statement problem. Is it possible to use an OR condition in an IF statement,
i.e
if (fileExtention == ".tmp" or fileExtention == ".lsi")
{
other statements go here.....
... more >>
Optimizing with 2003 .NET
Posted by Flashman at 8/23/2005 11:01:02 AM
A little confusing with setting up optimizing options with 2003 .NET.
Under the Optimization Tab. if you set to /O1 or /O2 is the program ignoring
the settings for Inline Function expansion, Enabling of Intrinsic?
Would seem these should be greyed out to let you know.
Bigger question is what ... more >>
New to VC++
Posted by Juan Puebla at 8/23/2005 9:20:45 AM
Hi,
I'm new in VC++ and I'm trying to do this:
String* arguments[] = Environment::GetCommandLineArgs();
if (arguments[1] == S"Hello")
Console::WriteLine(S"I got it!!!");
It's not working because I supose that arguments[1] is a pointer (Vb.Net has
no pointers). How can I solve this... more >>
debugging help!!!
Posted by Lloyd Dupont at 8/23/2005 12:00:00 AM
I have a managed class which calls into win32/GDI to do its drawing.
Somehow there is some GDI resource not freed.
Although in my OnPaint I do a try finally, restore the HPEN, HBRUSH, etc..
and then DeleteObject() everything I have created...
I have no idea...
Do you have any tip or do you k... more >>
Linking .lib files with static variables
Posted by JohnnySparkles at 8/22/2005 8:39:18 PM
Hi All,
I'm having some trouble with a .lib file in a project I'm working on.
The file contains a class which implements the singleton pattern.
To implement it I've declared a static pointer to the class called instance
outside of the class. The code looks something like this(the project... more >>
C1190 Error
Posted by David at 8/22/2005 8:31:34 PM
Can someone please tell me why I'm getting this error, I'm using the beta 2
for 2005 C++. This also happens with VC++ version 2002. Please help me.
Here is my code.
#include "stdafx.h"
#using <mscorlib.dll>
using namespace System;
int _tmain()
{
Console::WriteLine("hello world.")... more >>
Visual C++ 2005 & Unit Test
Posted by Diego Park at 8/22/2005 9:02:45 AM
Hello,
I am trying to generate tests for unmanaged C++ code, but I fail. Is that
possible or am i doing something wrong? If so, where can I find a sample
code? Thanks in advance.
Best wishes,
Diego Park... more >>
VPN
Posted by Lubos at 8/22/2005 5:34:33 AM
hi all,
does anybody have any idea how to (in C++) establish new VPN connection (or
modify older) in windows xp (it means define connection, all its seting and
then define new users)?
thanks for any help!
lubos... more >>
drawing question with HDC & mask / how to use a gray scale mask bitmap with HDC?
Posted by Lloyd Dupont at 8/22/2005 12:00:00 AM
I'm using ScriptTextOut function to do some styled international text
drawing char by char (glyph by glyph dare I say), along a curves or things
like that.
Anyway I just discovered ScriptTextOut only display black glyph, regardless
my current HPEN or HBRUSH.
(Note: I cannot use ExtTextOu... more >>
inpout32.dll
Posted by vertigo at 8/22/2005 12:00:00 AM
Hello
I want to write something to paraller port. I use windows XP and .NET, but
my program is Win32 Application. First of all i could not find any sources
of inpout32 library, i only found inpout32.dll, but when in
Project/Properties/Linker/Input/AdditionalDependencies i add inpout3... more >>
Newbie Hello World question: Show in textbox on button click
Posted by J.S. at 8/21/2005 7:24:00 AM
I can show Hello World in a MessageBox with this code:
private: System::Void button1_Click(System::Object^ sender,
System::EventArgs^ e) {MessageBox::Show("Hello, World!");
}
but I cannot show it in a textbox with this code:
private: System::Void button2_Click(System::Object^ sender,
Sys... more >>
This project is out of date: HelloWorld - Debug Win32
Posted by J.S. at 8/21/2005 5:23:08 AM
Whenever I try to debug a simple C++ application in VC++ I get this message:
"This project is out of date: HelloWorld - Debug Win32"
What does it mean? Do I need to modify something?
Thanks,
J.S.
--
... more >>
Urgent: Linking Error :__declspec(dllimport) public: class ATL::CS
Posted by .NET developer at 8/21/2005 2:51:12 AM
Hi ,
While upgrading my application from vc6 to vc7 I got followin linking errors :
__declspec(dllimport) public: class ATL::CStringT<unsigned short,class
StrTraitMFC_DLL<unsigned short,class ATL::ChTraitsCRT<unsigned short> > >
__thiscall CHPCmdExecFrame::GetStringParam(int,int *)"
(_... more >>
link problem in a C++ web service client
Posted by Mike Woinoski at 8/19/2005 8:57:51 PM
(I'm new to VS, so please forgive me if this is a faq.) I'm writing some Java
web services and need to test them with C++ clients. I can use either a Windows
Form application or an MFC application. I used VS.NET 2003 to create a C# client
that successfully processes SOAP messages to and from t... more >>
Upper/lower Case in C#
Posted by tshad at 8/19/2005 11:18:05 AM
I have the following in vb.net:
DataSetObj.Tables(0).Rows(i).ItemArray(1) =
UCase(DataSetObj.Tables(0).Rows(i).ItemArray(1))
I tried this is C#, but got the error that UCase and LCase don't exist.
DataSetObj.Tables[0].Rows[i].ItemArray[1] =
UCase(DataSetObj.Tables[0].Rows[i].ItemArray[1... more >>
paring char* using strtok
Posted by arssa2020 NO[at]SPAM yahoo.com at 8/19/2005 10:34:41 AM
hello,
i am writing a GPS app in evc++ 4.0, i am using c-style char* instead
of CStrings, i want to parse NMEA sentence such as
"GPZDA,162913.48,19,08,2005,,*63"
problem is when i use strtok it ignores an empty data field
below is the output for the sentence above
"GPZDA"
"162913.48"
... more >>
Button1_Click not used
Posted by tshad at 8/19/2005 9:26:43 AM
I had a project where I had some code in my Button1_Click procedure and
copied it over to a new project (that had the same button name on it) and I
couldn't figure out why the event never fired.
I then double-clicked on the button and a new event opened which normally
would have been Button... more >>
Windows
Posted by mike east at 8/19/2005 8:19:12 AM
Greetings,
Is there anyway to creat a Window in XP that is not rectangular.... i.e.
oval, round, rounded corners.....
I've been challenged to take an old Win95 application and "give it a new
look".... one thought I had was getting away from the old fashioned
rectangular windows.
Any ... more >>
|