all groups > visual c > may 2007
Filter by week: 1 2 3 4 5
How to access a method of VC++ 6.0 .exe in .Net
Posted by Naveeen at 5/31/2007 11:52:19 PM
Hi,
I have a VC++6.0 .exe file. I want to call a method of that .exe from .Net Application.
Please give the help..... more >>
The "generic" keyword and unmanaged code
Posted by morangolds NO[at]SPAM gmail.com at 5/30/2007 8:56:15 PM
Hi all,
I work as a glue coder and often have to interface existing mechanisms
with other platforms. Creating bridge code between command-line
functionality and desktop GUIs takes up a lot of that definition,
along with creating abstraction layers for older-style C code. I've
been working wit... more >>
How to access ENUM from a DLL
Posted by vijay.gandhi NO[at]SPAM gmail.com at 5/30/2007 8:52:06 AM
Hi,
I have a DLL (created in C++/CLI), that has a public enum.
For example:
namespace Utilities {
public enum DISTANCE_TYPE
{
a,
b,
c
};
}
This DLL was imported to another C++/CLI project. While I can see the
DISTANCE_TYPE in the 'object browser', I am not able to acces... more >>
UnhandledException 0x4bc0145c Access Violation writing location 0x
Posted by satheeskumar at 5/30/2007 7:01:01 AM
In my project i have a component named PTS Engine which is developed in VC++
..Net 2003. [VC 6.0]
And it is migrated to VC++.NET 2005 version. Initially this migration
process has coded and tested in VC++ .NET 2005 Beta version. In beta version
everything is working fine. When i tryied to run... more >>
app.config and probing
Posted by juan NO[at]SPAM msdnCompany.com at 5/29/2007 12:10:02 PM
I have a mixed mode application that uses several dlls, which most are native
and my new one is mixed. My new dll uses several dependent .NET assemblies.
I wanted to place these dependent .NET assemblies in a subdirectory, rather
than placing them all in the main directory. I added an app c... more >>
VC .net vs C++ code
Posted by Allen Maki at 5/29/2007 4:31:52 AM
I would be pleased if someone gives me a general idea; how I am going to do
this. I am using visual C++ .NET 2003.
I made a simple program using conventional C++ code. This program accepts
data from the user, does some calculations and outputs the result back to
the user using the co... more >>
CLI value structs used in C#
Posted by DaTurk at 5/28/2007 12:03:22 PM
Hi,
This might be something stupid, but I have a couple value structs that
I'm using in my CLI layer. I pass them up via callbacks to the c#
layer. In the c# layer, it wants my callback methods to have the
agurment type as ValueType, rather then the actual type, am I missing
something?
... more >>
Refering to Class, Types, and Functions from Dlls
Posted by safaci2000 NO[at]SPAM gmail.com at 5/25/2007 2:15:34 PM
Hi all,
I have a DLL that I need to access. I've managed to load it and
unload it successfully. The compiler is happy no complaints or
warning.
I need to refer to a class object that was defined in the class, and
I'm not sure how to go about it.
I understand that if I need to call a... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Stepping over operator new?
Posted by Alex O. at 5/25/2007 7:58:25 AM
Using VS2005, I am trying to disable stepping into the operator new
calls.
What NoStepInto entry should I put into the registry?
I tried "operator new=NoStepInto" but it does not seem to be working.
... more >>
Mixing Strings
Posted by Graeme Bell at 5/25/2007 12:00:00 AM
How can I mix std::wstring and .NET String? I'm finding the .NET
documentation frustrating.
Graeme
... more >>
Struggling with the basics of globalisation
Posted by Graeme Bell at 5/25/2007 12:00:00 AM
Hi all, my first post here.
I'm using VC++ 2005 Express. How do I get the names of special folders on
the local system?
For example, if I want to get the desktop folder name on any version of
windows I simply call
GetFolderPath(Environment::SpecialFolder::desktop);
I can get the arra... more >>
Using Additional Library Directories & Additional Dependencies
Posted by Yogi Watcher at 5/24/2007 8:55:01 PM
Hello,
I am using Visual Studio-2003. I created a project to build my library.
Since I am using third party libraries as well, I have specified those
additional library dependencies in project as "Additional Dependencies" under
Linker-Input options. Since those libraries are also in differe... more >>
Migrating from VC++ 6.0 to VC++ 2005
Posted by Arjun at 5/24/2007 12:37:01 PM
Hi,
After migrating my application from VC++ 6.0 to VC++ 2005, I receive the
error C2593 'operator +=' is ambiguous.
It refers to the following line:
Name += pManager->GetAgentName();
where Name is a string and GetAgentName also returns a string.
Please suggest.
Regards,
Arjun... more >>
Pointers btwn C# and C++
Posted by Joachim at 5/24/2007 9:15:00 AM
I have a native C++ pointer object which I need to hold in a C# environment,
initialize in the C++ environment and the pass between the C# and C++
environments. Which is the data structure to use? I have tried to use an
IntPtr in C#, send it through C++/CLI as a System::IntPtr and convert it t... more >>
Weird name collission
Posted by Joachim at 5/24/2007 6:07:02 AM
How can a member of an enum type, like
typedef enum tagMPEG4Mode
{
None = 0,
Divx = 1,
Microsoft = 2,
} MPEG4Mode;
collide with a namespace, like Microsoft ? These are both third party
libraries - how can I solve the name collission?... more >>
_CrtIsValidHeapPointer
Posted by JsCharly at 5/24/2007 12:01:01 AM
Hello,
My application is using a Dll loaded with the function
"LoadLibrary(<NameOfTheDll>)"
In the dll there is the following fonction :
char * GetMessageError(int Error)
{
char * pMessageError;
CString ErrorMessage;
(...)// filling of Error message
pMessageError= new ch... more >>
Callback function from native C to C++\CLI using non-static member or delegates
Posted by smmk25 NO[at]SPAM hotmail.com at 5/23/2007 10:17:23 PM
Before I state the problem, I just want to let the readers know, I am
knew to C++\CLI and interop so please forgive any newbie questions.
I have a huge C library which I want to be able to use in a .NET
application and thus am looking into writing a managed C++ wrapper for
in vs2005. Furtherm... more >>
Odd behavior of fopen with ccs option
Posted by PLS at 5/23/2007 5:31:24 PM
I'm puzzled about the behaviour of fopen with the ccs= options. The
table below iswhat I'm seeing. I am opening a file with the fopen option
shown, then writing to it with fputws. What I want to happen it to read
either Ascii or Unicode files as Unicode, but to write the files as
Unicode whe... more >>
How to save data to Access database file!
Posted by Shyam Barnwal at 5/22/2007 5:36:37 PM
Hi sir,
Good afternoon,
I am working on winamp general purpose pluggin "gen_whatsplaying " project
downloaded from the site www.schaffrath.net
I compiled and build the project successfully using platform SDK Feb 2003
and Speech SDK5.1.
Now the winamp plugins "gen_whatsplaying" interface s... more >>
Slow run Speed of optimized code in VS2005 vs VS2003 (Unmanaged C++)
Posted by Chris288 at 5/22/2007 4:51:04 PM
Hi,
I have a problem where our app when compiled in VS2005 runs about 50%
the speed it attains in VS2003. This is an unmanaged C++ app.
I have tried most combinations of the optimization and language settings
with little change in run speed.
I compared the generated native code in var... more >>
Is there a way to Get around "Entry Point Not Found" error??
Posted by Rymfax at 5/22/2007 11:07:14 AM
I have an application that will be used on both XP and Vista. One of
the things this application needs to do is determine the exact
operating system it is on. To get the correct "flavor" of Vista that
might be running, there is a new function in Kernel32.dll called
GetProductInfo(). The probl... more >>
Namespace Scope functions and the static keyword in CLI
Posted by DaTurk at 5/21/2007 2:19:55 PM
Hi,
I have an interesting issue, well, it's not really an issue, but I'd
like to understand the mechanics of what's going on. I have a file,
in CLI, which has a class declared, and a static fuction. Because the
class is declared globally, I declare it as static.
Is a function with a names... more >>
Empty catch
Posted by DaTurk at 5/21/2007 10:55:24 AM
What's the CLI equivalent of the empty catch?
i.e.
try{}
catch
{}
... more >>
LINK : fatal error LNK1104: cannot open file "nafxcwd.lib"
Posted by Hunter at 5/21/2007 12:09:32 AM
Hi all,
I'm a C newbie in a desperate need of help. My background isn't
programming but engineering, so my programming skills are somewhat
limited (I am able to write simple single-threaded progs in C, but
hardly more than that). It just happened that my work requires me to
take a program and... more >>
Atl in WinForms app
Posted by Maxim at 5/21/2007 12:00:00 AM
Hello everybody,
I have problems with using atl classes inside a WinForms application. I've
already posted a message here. I've tried different approaches with no
success.
Maybe somebody could show me a simple WinForms project that uses for example
CComBstr class.
PS. I'm using C++/CLI ... more >>
Void pointer to managed object type
Posted by vijay.gandhi NO[at]SPAM gmail.com at 5/19/2007 2:52:54 PM
Hi,
I am trying to convert some unmanaged code (C++) to managed code
(using C++/CLI).
1) One of the functions used returns a void* which I need to cast into
a handle of a managed object. Can somebody please tell me how.
Actually, the function that returns a void* is a part of a MFC class ... more >>
"no symbols have been loaded for this document"
Posted by Scott McFadden at 5/18/2007 3:27:31 PM
We have a C# client (VS2005 SP1) and a C++ / CLI DLL (VS2005 SP1). The
client and the dll are both in the same solution. "Enable unmanaged code
debugging" option is enabled in client project. We set break points in our
CPP code and notice yellow warnings with "No symbols have been loaded... more >>
C++ (managed) assembly attributes
Posted by Bob Altman at 5/18/2007 1:13:40 PM
Hi all,
I've inhertied a managed C++ (Visual Studio 2005) application. The project
apparently contains no assembly attributes (the kind of stuff that would be
in an AssemblyInfo.cs file). How do I add this stuff to a managed C++
project?
TIA - Bob
... more >>
Dipose vs Destructor
Posted by Scott McFadden at 5/17/2007 5:05:14 PM
I have a C++ CLI Managed DLL project which is consumed by C# clients.
What is the recommended way for ensuring proper clean up of managed
resources and native resources in a managed C++ class?
thanks
ScottM
... more >>
BCL for native C++ - possible?
Posted by Andreas Schmitt at 5/17/2007 2:11:50 PM
Crazy idea but...
I think everyone could agree with the statement that the CLI standard
Base Class Library is incredibly useful, not to mention the extentions
by microsoft and managed directX and several other stuff that builds on
top of the BCL.
Now.. do you think it would be possible t... more >>
make to vcproj (or even nmake)
Posted by chris.love NO[at]SPAM gmail.com at 5/17/2007 11:40:17 AM
I'm trying to port a project from Linux to Windows. Currently on Linux
we're using GNU Make and... of course... makefiles.
Does anything exist out there to convert makefiles to vcproj files, or
even nmake makefiles in at least a semi-automatic nature?
I'm sure this gets asked a lot, but I ca... more >>
SetAt() method in Net like CString class.
Posted by Tomas at 5/17/2007 9:14:00 AM
Hello all.
Is there something similar to this in NET?
CString s( "abcdef");
s.SetAt(1, 'a');
I am looking for a method in the String class but I do not see anything.
Thanks in anticipation.
--
Tomas... more >>
_CrtIsValidHeapPointer and templates
Posted by Erik_Wikstr=F6m at 5/16/2007 5:29:08 AM
I have a native DLL which is called from a managed application. One of
the calls to the DLL returns a std::vector<Cell> (by value) where
Cell is a POD type, everything works fine until the function making
the call to the DLL returns, at which point I get a
CrtIsValidHeapPointer assertion failur... more >>
CLI/C++ documentation for VC8 (2005)
Posted by cjs at 5/15/2007 11:02:00 PM
Hi all,
VC8 CLI/C++ has lots of new syntaxes and changes since previous versions,
and not fully compliant with ECMA-372 standard either. I got lots of
compilation errors. Could anyone point me a document actually detailing VC8
CLI/C++ syntax.
Many thanks... more >>
CLI + this constructor
Posted by DaTurk at 5/15/2007 8:57:19 AM
Hi,
I was wondering if there is a CLI equivalent to using the this keyword
to overload constructors. You know where you would do something like
MyClass() : this("something")
{
}
MyClass(String name)
{
}
I can't seem to figure it out.
Thanks in advance
... more >>
Fire KeyDown in C++
Posted by T at 5/14/2007 8:50:38 AM
Hi,
How do I fire the KeyDown event in Managed VC++? I am getting a
compile error saying "event does not have a raise method". Please
help.
regards,
T
... more >>
coping in Media Center
Posted by Gency at 5/13/2007 6:17:01 AM
Hi, I'm having a problem the coping cd's etc option is missing in Media
Center. It used to be available but it has just disappeared! Can anyone help.
Thanks... more >>
Stupid vc++ question, memory leaks
Posted by jschvat at 5/13/2007 12:09:02 AM
I get the following output in vs2005:
'AllocationTest.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', No symbols
loaded. Detected memory leaks!
Dumping objects ->
{263} normal block at 0x00356CD8, 564 bytes long.
Data: <H 5 5 5 5 > 48 A0 35 00 C8 A0 35 00 88 A0 35 00 08 A1 35 00
Objec... more >>
VC8 / CLI / MFC linking question
Posted by Scott McFadden at 5/11/2007 2:41:40 PM
I have a managed C++ DLL (VC8) that I would like to statically link with MFC
(it consumes both native and managed resources).
What project settings must i specify to produce a managed C++ DLL that is
statically linked with MFC? Is this even possible?
thanks
ScottM
... more >>
NT service / printf question
Posted by Scott McFadden at 5/11/2007 1:48:15 PM
Is there much overhead leaving in printf calls for a release build of my NT
service (VC8)? This app runs as a NT service or console app so it's nice
to have the console ouput when troublshooting the application. The console
only has a fixed buffer size so I guess that running as a service ... more >>
dll entry point not found
Posted by Joachim at 5/11/2007 6:16:02 AM
I'm trying to call my C++/CLI dll from a C# library. I gives me the error
unable to find an entry point named GetA
Here's my C++/CLI file:
#pragma once
//#ifdef WRAPPERAPI_EXPORTS
//#define WRAPPER_API extern "C" __declspec(dllexport)
//#else
//#define WRAPPER_API extern "C" __declsp... more >>
Bad enough to be a bug
Posted by PLS at 5/10/2007 8:13:45 PM
I'm amazed at the following generated code.
The environment is:
VS2005 SP1
Debug mode
Declarations
bool different;
fileVersion and MSGFILEVERSION are unsigned int
different = different || header.fileVersion != MSGFILEVERSION;
00672244 movzx eax,byte ptr [different]
... more >>
How easy is it to accidentally not use pin_ptr where you ought to?
Posted by David Lowndes at 5/10/2007 4:10:49 PM
I've got a project with a fair bit of mixed C++/CLI calling native
code, often passing raw pointers - and I'm worrying that we may have
occasions where we don't use pin_ptr when we need to.
However, after a few experiments I was unable to compile code (VS2005)
that casually tried to do the wro... more >>
IIS 6 / native memory question
Posted by Scott McFadden at 5/10/2007 2:27:53 PM
When I run my 32 bit VC 8 DLL hosted by a managed C++ Winform APP on Win2003
32 bit with 4GB ram it runs fine. When I run the same DLL hosted under a
Managed C++ ASP.NET 2.0 Webservice project (also on Win2003 bit with 4GM
ram, the DLL fails). If i downgrade the box from 4GB of RAM to 2GB of... more >>
Delegate as argument (C++/CLI)
Posted by vijay.gandhi NO[at]SPAM gmail.com at 5/10/2007 10:27:33 AM
Hi,
I am trying to convert a set of classes written in VC++ 6.0 to a .DLL
file using VC++ .NET (Visual Studio 2005) and C++/CLI.
I made one of the classes (one at the root level) to be a 'ref' class.
This class used pointer to a function. Since CLR does not support a
ref class to have a poi... more >>
Using string variables inside classes
Posted by Andy at 5/10/2007 3:15:00 AM
Hello,
I'm trying to use a string type variable inside a class. I can do this fine
with no problems when the class is inside a cpp file simply by adding
#include <string>.
However, my program has the class specification in a header file and the
functions in a cpp file, for better organisatio... more >>
Allocate reference type on native heap?
Posted by Notre Poubelle at 5/9/2007 5:24:00 PM
I apologize if this question has been asked before (I imagine it has). But,
I'd like a definitive response. Is it possible using C++/CLI to allocate a
(normally) managed reference type on the native heap?
That is, instead of using gcnew, and being subject to garabage collection,
could I u... more >>
How to report an error to microsoft?
Posted by Lloyd Dupont at 5/9/2007 4:19:11 PM
On "some client's computer" the folowing C# code:
==
XmlDocument doc = new XmlDocument();
....
doc.Save(Application.LocalUserAppDataPath + "config.config");
==
throw the following error:
==
Exception : System.IO.IOException
Message : Unknown error "-1".
Stack :
at System.IO.__Er... more >>
dllexport problem on native Singleton in mixed mode dll
Posted by Fabian at 5/8/2007 6:35:22 AM
Hello,
I want to give multiple native classes (in different mixed mode dlls) access
to a managed output window (for error messages). Therefore I wrote a native
singleton with __declspec (dllexport). I get the following compiler errors:
Error 224 error C3389: __declspec(dllexport) cannot be... more >>
Problems with assembly and manifest
Posted by Dynamomite at 5/8/2007 6:01:01 AM
I'm trying to deploy an application having a couple of dlls. One of those 2
dll's makes user of MSCV80(d).dll, namely the latest version (the one with
Visual Studio SP1, version 8.0.50727.762).
The problem is that the correct dll does not normally exist on a win XP or
server 2003 system unles... more >>
|