all groups > visual c > april 2006 > threads for april 1 - 7, 2006
Filter by week: 1 2 3 4 5
iostream,cons. app.,int main(){return 0;}, Won't link!
Posted by pyromedia NO[at]SPAM tiscali.co.uk at 4/7/2006 5:24:01 PM
Anybody know why this does not link?
I have tried google 50 odd ways and nobody else seems to have this
problem
quite. It is meant to be a console application...
#include <iostream>
int main(){return 0;}
------ Build started: Project: HelloWorld, Configuration: Debug Win32
------
Com... more >>
Linker error RC1015
Posted by picci at 4/7/2006 2:31:54 PM
Hi all,
I have installed a visual c++ express edition 2005 and I have converted an
older form application ( vc++ 2003.net managed code.).
When I attempt to compile the project I get this kind of error from compiler
fatal error RC1015: cannot open include file 'afxres.h' ..
placed in app.... more >>
VC2005 and boost::shared_ptr
Posted by adebaene NO[at]SPAM club-internet.fr at 4/7/2006 7:31:19 AM
Hello group,
There seems to be a bug int the interop layer in VC2005 when dealing
with certain pointer types (or values?)
Here is a repro case using Boost version 1.32 and C++/CLI :
using namespace System;
#pragma unmanaged
#include <boost/shared_ptr.hpp>
boost::shared_ptr<int> Return... more >>
'System.NullReferenceException'
Posted by nishi.hirve NO[at]SPAM gmail.com at 4/7/2006 2:38:18 AM
i've created one DLL (testlib) and i want to use it in my application
as an array of its instances ...
i'm getting an exception as
'System.NullReferenceException'
plz consider the following code ..
//----------------------------------------------------------------------------------------... more >>
DLL chaining? : LoadLibrary()
Posted by Bit byte at 4/7/2006 1:14:48 AM
I want to write a an application A, which calls LoadLibrary to load a
DLL (B).
However DLL (B), also calls LoadLibray (NOT IN DLLMain) to laod another
DLL (library C)
Is this kind of Dll chaining possible?
Are there any gotchas I have to be aware of?
... more >>
How to [properly] calculate sales commission in C/C++?
Posted by Jurek at 4/6/2006 12:51:16 PM
I have 10+ experience in C/C++ - mostly automation and graphics. I have
never written any business apps though. Recently I've been asked to write a
simple report that would calculate sales commission. The report needs to be
generated from within a C/C++ app. I don't want to mess it up so I... more >>
Managed C++ on Smart Devices
Posted by Paul Mc at 4/6/2006 9:33:28 AM
Does anyone know if managed C++ is supported on Smart Devices, like for a
Pocket PC 2003? I'd like to use ADO.NET for data access on a Pocket PC .
... more >>
system::string to int with VC++
Posted by Code[R] at 4/6/2006 2:40:49 AM
hello all, i've a problem :s
i've tried to convert a "system::string" (a textbox) to an "int" but i
have only found a function to convert system::string to char and char
to int :s :
Convert::ToInt32(PtrToStringChars(ligne23->Text));
but i get a bug :s can you help me ? (sorry for my engli... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
_bstr_t leads to a crash
Posted by ashish_chap at 4/6/2006 1:23:34 AM
Hi,
I am using _bstr_t class in a function. This is used in an application
that is used in an multi-threaded environment. The function is
implemented as follows:
int Function(wchar_t *sqlCmd)
{
_bstr_t cmd ;
cmd = sqlCmd ;
CoInitialize(NULL);
..
..
..
return 0;
}
The above ... more >>
Wie benutze ich WNetGetConnection korrekt mit C++
Posted by Bernd Muent at 4/6/2006 12:00:00 AM
Hallo zusammen,
möchte rausfinden, ob zB das Laufwerk "W:\" ein gemapptes Netzlaufwerk
oder ein lokales Laufwerk ist.
Ich denke, das geht mit WNetGetConnection.
Finde mit Google irgendwie kein C++ Beispiel, nur sowas:
Dim ret As Integer
Dim out As String = New String(" ", 260)
Dim len ... more >>
events and delegates accessing from another class
Posted by Asfar at 4/5/2006 5:19:20 PM
Here is my problem:
In file form1.h I have the following code:
#pragma once
#include "Test.h"
namespace AccessCheck
{
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using nam... more >>
makefile problem
Posted by Ralf Propach at 4/5/2006 3:24:36 PM
I have a visual studio 2005 project that consists of two managed C++ classes
and some unmanaged C functions. The output of this project is a dll,
that is loaded by a program with LoadLibrary().
Then I have written a makefile that uses the same compiler and linker
options to generate this dll.
... more >>
Bug in precedence for built-in types?
Posted by Sean Connery at 4/5/2006 2:48:02 PM
I would expect the output to be:
5
post increment
assign
5
This is the case for Visual c++ 6 AND g++ 3.4.2. However, for visual c++
7.1, I get:
6
post increment
assign
5
Any ideas? Is this undefined behaviour? I think its pretty well defined. But
in either case, its inconsisten... more >>
Accessing Form Class in another Class in C++/CLI
Posted by Asfar at 4/5/2006 2:45:40 PM
Hi,
I have a form Form1 in my application.
I now create a generic class Test1. In this class I declare a variable of
type Form1. I also include the header file for the form in this class.
This gives me a compiler error. Can someone tell how do I access it.
Thanks
... more >>
Web Service, Multithreaded, Logging to Database
Posted by Stephen Carson at 4/5/2006 1:17:46 PM
I'm trying to build a Web Service that will kick off threads as logging
requests come in. These threads will then log to the database. I have
been able to make a simple Web Service. I have been able to get a
simple multi-threaded example working. I have been used the
SqlDataAdapter and DataSet c... more >>
.Net and ISAPI
Posted by Drew Burchett at 4/5/2006 10:52:37 AM
I am currently coding an ISAPI filter and I would like to use some .Net
functionality within the filter. However, when I include calls to anything
in the framework, it locks the dll and will not release it until I restart
the machine. Even after restarting the W3SVC and removing it from the ... more >>
Advantages and Disadvantages
Posted by Husam at 4/5/2006 8:37:01 AM
Hi EveryBody:
I have research about advantages and disadvantages of C++ languages In one
of my programming courses.
Can Any one help me and told me about advantages and disadvantages of C++
or redirect me to some web sites proffessinal about this kind of reserach ?
any help will be app... more >>
Use of ODBC in C++ .NET
Posted by nishi.hirve NO[at]SPAM gmail.com at 4/4/2006 10:29:36 PM
Hello,
I want to use postgreSQL database in my C++ .NET application but when I
try to connect to it, through connect to database, it is shows dialog
box as follows:
Unable to connect to database
It is possible to connect to SQL Server Desktop Engine Databases and
Microsoft Access databases... more >>
WndProc
Posted by S Wheeler at 4/4/2006 10:28:52 PM
Hi -
I have a vc++ WinForms app. Can I override the WndProc so I can send custom
messages to my app. Is there any way to do this? I need to notify the main
form of events from a library. How is this done in VC++?
Thanks
... more >>
error LNK2020: unresolved token
Posted by tllee NO[at]SPAM bloomberg.net at 4/4/2006 7:28:50 PM
I wrote a simple stack program using class template on VC++ 2003 but am
unable to resolve the following link errors:
LINK : error LNK2020: unresolved token (0A000046) Stack.__dtor
LINK : error LNK2020: unresolved token (0A000048) Stack.__dtor
LINK : fatal error LNK1120: 2 unresolved externals
... more >>
-1.#IND000 can't be compared with 0.0
Posted by Zongwen at 4/4/2006 1:16:02 PM
this problem happened after we upgrade our program from vc6.0 to vc.net2003
unmanaged code.
Following are the sample code:
float p, cpr = 3.4028234663852886e+038;
p = (1.0f - pow(1.0f-cpr/100.0f, 1.0f/12.0f));
if(p<0.0f)
p = 0.0;
==
Because the value of cpr is blow u... more >>
gcc v2.95.3 --> VS
Posted by plize NO[at]SPAM letsdothatagain.com at 4/4/2006 9:48:44 AM
Hello people,
I have C++ code compiled with GNU compiler gcc version 2.95.3.
which I need to edit and run under windows. (I have access to VS6 and
VS.NET)
What approach is easier?
1) Rewrite it?
2) Add functions so that the original code makes sense?
For example, the following line genera... more >>
Set process priority
Posted by H.B. at 4/4/2006 8:58:02 AM
Hi,
How can I change the priority of the current process in managed C++. I think
it sould look like :
System::Diagnostics::Process::PriorityClass =
System::Diagnostics::ProcessPriorityClass::High;
Thanks,
Hugo... more >>
find a charcter in string
Posted by Gabi at 4/3/2006 10:58:01 PM
Hi all,
i need to find how many times the charcter "\n" is in a string.
which string function can give me this information.
Thanks an advance... more >>
Merging menuitems : nobody knows the answers ???
Posted by cc at 4/3/2006 9:42:19 PM
hi,
i've posted this message at the start of last weekend, maybe that's why I
didn't receive any answer (I know there are better things to do than sit in
front of a computer a whole weekend)
that's why I'll post again now.
--->
when adding items to a MenuStrip VS 2005 defines them as objec... more >>
IMAPI query cancel doesn't work!
Posted by tonylc NO[at]SPAM gmail.com at 4/3/2006 6:41:14 PM
Hey guys,
In my burn project, I have everything working except the
cancellation of the burn. I have it setup such that when the user
initiates a "cancel" the IDiscMasterProgressEvents handler will set the
argument to true as shown:
HRESULT STDMETHODCALLTYPE CDProgressEvents::QueryCancel(b... more >>
Testing type of void*
Posted by Notre Poubelle at 4/3/2006 1:54:03 PM
Hello,
I have some code where I need to store a value as LPVOID. I'd like to be
able to do some runtime testing about whether the thing that's pointed to is
of a certain type. I've tried using RTTI's typeid and dynamic_cast functions
(the latter won't compile), but they've not worked for ... more >>
MSVC not linking in "unused" libraries
Posted by Chris Stankevitz at 4/3/2006 11:55:13 AM
At link time, MSVC determines some of my libraries are unused and doesn't
link them into my exe. This undesirable feature causes problems when I
employ the factory pattern. With the factory pattern, the app decides at
run time which code to use.
Is there a link option to turn of this feat... more >>
C/C++ Console App running 10 times slower in VS2005 from VS2003
Posted by Fiddelm3742 at 4/3/2006 10:40:02 AM
Well, I dont exactly know if there was a change in how Console Application
projects are run/compiled from VS2003 to 2005 or what, but I have an
application (mostly C) that used to run in about 2 minutes and now runs in
hours. The output of the program seems the same, but the time it takes it ... more >>
why i can't put struct to Generic::List
Posted by shengmin.ruan NO[at]SPAM gmail.com at 4/3/2006 8:27:36 AM
the wrong code is:
[StructLayout(LayoutKind::Sequential)]
public ref struct OutPacket{
int index;
List<MainInfo^>^ mainInfos;
};
[StructLayout(LayoutKind::Sequential)]
public ref struct MainInfo{
String^ value1;
String^ value2;
};
----------
the error message is:
Error 1 error... more >>
Loadlibrary(), function callbacks and multi-threading
Posted by Bit byte at 4/3/2006 12:00:00 AM
I am writing an application that requires me to load a (Win32 C) libray
and then register several call back functions.
I am loading the libary in a worker thread and then registering
functions in the worker thread in the loaded library.
Two questions
1). Does loadlibrary(0 run the execu... more >>
in-place function
Posted by peter.mcclymont NO[at]SPAM gmail.com at 4/2/2006 9:36:24 PM
What is an in-place function?
And I guess if that is answered it will be easy to work out what a
non-in-place string is.
What is the standard way to write a 'library function', e.g. one that
reverses a string.
Thanks,
Peter.
... more >>
Managed C++ Classes
Posted by peter.mcclymont NO[at]SPAM gmail.com at 4/2/2006 4:55:55 PM
I am used to C++, but not managed C++.
All I want to do is write a class to reverse a string. Don't ask me
why, it is not for a real world application. Actually it is for a test.
My code looks like this at the moment. It is not finished yet of
course, but I am having trouble compiling, it sa... more >>
Class, char array, error
Posted by MX at 4/1/2006 7:48:14 PM
Welcome!
I have something like that:
ref class DCAM
{
...
private:
char str[64];
...
};
And in main program:
DCAM^ CAM = gcnew DCAM();
CAM->str[0] = 'a';
this->Text = gcnew System::String(Cam->str);
After compilation I got:
error C2664: 'System::String::String(const wc... more >>
|