all groups > visual c > november 2006
Filter by week: 1 2 3 4 5
Q: Restore VS 2k5 file associations??? - A quirk problem
Posted by Lyle Avery at 11/30/2006 9:40:17 PM
Hi guys,
Who knows how to restore VS 2k5 file associations, I've clicked =
Tools->General->"Restore File Associations" button but it doesn't work =
at all. I know Repair the whole product could fix it, but it costs too =
much time. So, if anyone could fix this issue please tell me asap.
Any... more >>
Managed C++ to C#
Posted by John Olbert at 11/30/2006 7:56:01 PM
What Method signature do you use in Managed C++ that will appear as the
following in C#--
F1(out int Int1){}
I have tried--
public void F1(int^ Int1){}
Thanks.
--
John Olbert
... more >>
loading Markup::XamlReader::Load from resource file
Posted by John Dunn at 11/30/2006 3:18:22 PM
Since currently we aren't allowed to have compiled XAML files embedded in C++
apps I'm using Markup::XamlReader::Load to dynamically load XAML files. This
works perfectly fine with external files but I'd like to be able to load a file
specified in a .resx resource.
I've added my .xaml file ... more >>
Visual .NET 2003 local struct definition bug
Posted by Mike at 11/30/2006 12:00:00 AM
Hi !
I have some strange problem and I would like to know if it is a bug or not :
In my projects, in 2 different .cpp files, I use the same name to define a
local structure:
file1.cpp :
typedef struct TOTO
{
CString s;
GUID g;
GUID g;
};
file2.cpp :
typedef struc... more >>
getopt.h in VS2005 c++
Posted by auditory at 11/30/2006 12:00:00 AM
I have sources written on linux quite long ago.
They are compiled good on current linux machine.
but not in VS2005.
The cause of problem is #include<getopt.h>.
Is there any correspoinding files which can be used instead of getopt.h??
I tried xgetopt.h from codeproject
http://www.codeproje... more >>
Using #line directive
Posted by AA at 11/29/2006 9:32:37 PM
Hi,
I have a C++ project in DOT NET. I am using the __FILE__ and __LINE__
to print the current file and line number. I do not want the file anem
with the full path to be printed. So I used the #line directive.
[code]
#line 3 "11.cpp"
[/code]
Still the full file name along with the na... more >>
int[,] array in C++?
Posted by olexij.tkatchenko NO[at]SPAM googlemail.com at 11/28/2006 7:09:53 AM
Hello,
I am failing to create appropriate array in C++ to pass to a C# method.
The method looks like
public Foo(int[,] data) {..}
in C#. When I try to call it with an array initialized in C++ as:
int inputArray[][2] = {{0, 0}, {0, 1}, {1, 0}, {1, 1}};
it fails. So what is the proper way ... more >>
Simple Threading Question
Posted by gnassar NO[at]SPAM gmail.com at 11/28/2006 1:47:01 AM
I'm attempting to use threads in .NET VC++ comming from a strict C
background. Unfortunately I'm a bit rough. I've gotten a rather good
knowlege of VC++ and have been converting projects from VB and C# to
learn how to do them in VC++ .NET.
Unfortunately I can't seem to understand something rat... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
STL Link Errors converting from VC7 to VC8
Posted by Bruce at 11/27/2006 10:19:52 PM
I am converting a DLL project from VC7 to VC8. The project is a managed
C++ DLL. The project uses a non managed C++ library compiled an
linked in VC7 which uses the STL.
I just about got everything to link with the exception of some STL link
errors.
Here is an example of one of the ... more >>
'Refactor' has disappeared
Posted by V at 11/27/2006 8:00:05 AM
I've been using VS2005 for a mixed C# / C++ project. Somewhere along
the line it seems that 'refactor' on the context menu disappeared for
C++ projects. I do believe that this was working at one time. Is this
a known bug?... more >>
Allow instantiation internal but not external?
Posted by Bruce at 11/26/2006 1:00:08 PM
Is there any way to define a class in such a way that it will allow
instantiation of the class internal to my project but not allow it when
the class is used via the resulting DLL of my project? In ActiveX this
can be done with the noncreatable keyword. How can this be done in .Net?
I tr... more >>
Adding my control to the .NET list in Add/Reference dialog (ReAsm)?
Posted by Bruce at 11/24/2006 11:10:49 PM
I created a .NET control in managed VC. I noticed that many similar
controls are listed under the .Net tab of Add/Reference. How do I get
my control in this list?
I tried RegAsm which said it registered the control with no errors. But
the control still does not show up on the tab. How d... more >>
Send Message(string) c# exe to vc++ exe(unmanaged) using WindowsSendMessage
Posted by Mayur at 11/24/2006 4:57:03 PM
I tried followinf but working fine fo int but how to do it for string using
user custome message
in c#
[DllImport("User32.dll")]
public static extern int FindWindow(string strClassName,string
strWindowName);
[DllImport("User32.dll")]
public static extern Int32 SendMessage(
int hWnd... more >>
Shortcut to compile a file of any type
Posted by Torben Laursen at 11/24/2006 3:33:05 PM
Hi
Often I just want to compile one c++ file in a project the check it for
errors.
Now I can right click on a *.cpp file and select "Compile"
But is there a way and short cut to compile a file of any type. luke *.cc,
*.h, *hpp
Thanks Torben
... more >>
VC++ 2005 Express and Winsock
Posted by Rich at 11/24/2006 7:15:55 AM
I have some old C code that uses winsock for network programming. It
appears that VC++ 2005 (Express) does not include winsock support. Is
there any way to use winsock functions?
... more >>
Visual C++ 2005 on NT 4.0 SP6a
Posted by Klaus Aschenbrenner at 11/23/2006 5:52:56 PM
Hi!
2 questions:
1. Can I run Visual Studio C++ 2005 on NT 4.0 SP6a?
2. Can I create applications for NT 4.0 SP6a with Visual Studio C++ 2005?
Thanks
Klaus Aschenbrenner
www.csharp.at
http://www.sqljunkies.com/weblog/klaus.aschenbrenner
... more >>
createdll tutorial VC++ 2005
Posted by Eran.Yasso NO[at]SPAM gmail.com at 11/23/2006 1:04:00 PM
Hi,
I need to develop DLL that exposes API. It should be accessed by C#.
Can any one please help me with that? any tutorial or link would be
greate.
TIA,
... more >>
Trivial (?) namespace problem
Posted by michael.d.pedersen NO[at]SPAM googlemail.com at 11/23/2006 3:03:53 AM
Hello group,
I am new to Visual C++ 8 and have a seemingly trivial problem using
namespaces. The scenario: I have two classes, TestClass1 and
TestClass2, in the namespace Test. I would like to create a reference
to TestClass2 in TestClass1; but the compiler doesn't seem to recognize
the names... more >>
Consuming VB.NET DLL in VC++.NET
Posted by Simon Smith at 11/23/2006 1:27:01 AM
Hi,
I'm sure this is a question that comes up reasonably regularly, but I'm
getting an error with the forum search function at the moment, and haven't
found anything with a browse, so forgive me if this is repeating things!!
Should also clarify that it's a VERY long time since I've done ... more >>
F# programming language
Posted by Jon Harrop at 11/23/2006 12:00:00 AM
Microsoft Research are developing a functional programming language called
F# for .NET and I've been playing with it recently. I've uploaded some
demos here:
http://www.ffconsultancy.com/dotnet/fsharp/
I'm keen to see what Windows developers think of this language as we're
considering u... more >>
Can't get linker to resolve __iob
Posted by Eric Twietmeyer at 11/22/2006 4:01:01 PM
I'm converting a project from vs2003 to vs2005. The project links against a
thirdparty library (pvrtc.lib, the PowerVR tc compression library), which
apparently was built with some older version of the MS C++ compiler. It is a
static library that has embedded libc.lib dependencies. In my pr... more >>
partial link
Posted by Eric at 11/22/2006 2:24:29 PM
Hello all,
This is a C++ linker question.
I'm trying to build an obj file, say foo.obj so that it is pre-linked
with its dependencies. However I do not want to generated an executable
right away. Some people call this "partial linking". Note that
packaging all dependent objs into a library ... more >>
Compiling C DLLs for reuse in MC++?
Posted by WebSnozz at 11/22/2006 11:04:44 AM
I have an application written in C that does a lot of low level stuff.
It does a lot of things like casting from void*'s. I want to create a
new GUI for it in either C# or MC++, but reuse the existing code.
The options I've considered so far:
1. Create a new MC++ GUI project and add the *... more >>
unmanaged pointer in managed c++
Posted by waldo at 11/22/2006 8:43:44 AM
Hi, i'm new to this stuff so please excuse my lack of understanding!!!
I've got an unmanaged class called Category and a coresponding managed
class, also called Category (shown at the end of this message)... I can
create and manipulate the class successfully in c#, but it crashes and
i get the f... more >>
Isolated Storage - Problem with GetMachineStoreForAssembly
Posted by C#Coder at 11/22/2006 6:27:02 AM
I need to create an Isolated Storage File for my assembly with machine level
scope. I have used the 'GetMachineStoreForAssembly' method to do this and
this creates the Isolated Storage File successfully but when I log onto
another profile and run the code, it creates another Isolated Storage F... more >>
can't include _alloca as an intrinsic function
Posted by mousou at 11/22/2006 3:06:09 AM
Hi all,
I trying to port a WDM driver in VS.Net 2005. I had several difficulty,
but it's one of them I still did not found any solutions.
My code use the function _alloca to allocate space on the stack. When I
compile my code with the include of <malloc.h> I have no problem but
the difficul... more >>
on_which_takes_a_“refâ€_param
Posted by Cmtk Software at 11/22/2006 12:16:01 AM
The following code:
public __gc class MyClass
{
public:
void MyFunc (int __gc* number);
};
Generates the following metadata when compiled in VC 2005 with the
/clr:oldsyntax switch in a DLL project:
public class MyClass
{
public MyClass();
public void MyFunc(... more >>
C++/CLI managed Enum appears empty in CSharp
Posted by Cmtk Software at 11/21/2006 11:38:02 PM
I'm trying to define an enum which will be used from unmanaged c++, C++/CLI
managed c++ and from C#.
I defined the following enum in a VS dll project set to be compiled with the
/clr switch:
public enum Days
{
Sunday
};
After building the project, I added the created DLL as a ref... more >>
System.NullReferenceException with unmanaged code wrapper
Posted by Bruce at 11/21/2006 11:03:42 PM
I am using VC .NET 2003.
I created a simple unmanaged class in C++. The class is contained in a
library.
I then created a simple managed class wrapper that calls a function in
the unmanaged class. I am getting a System.NullReferenceException when
instantiating the unmanaged class. What... more >>
Adding VERSION RESOURCE to DLL Project
Posted by Rich at 11/21/2006 6:49:59 AM
I am resurrecting this question (since it got bumped down by more
recent posts).
This is probably very simple - I need to add a version resource to a
DLL project in MSVC++ 2005 Express in order to have version info,
copyright, etc. when checking the DLL file properties from Windows
Explorer.
... more >>
How to separate GUI and data
Posted by alan.chambers NO[at]SPAM cambridgeconsultants.com at 11/21/2006 2:59:08 AM
I am new to C++/CLI. I want to do a very simple thing. In other C++
applications, my forms have always been 'context free' in the sense
that I pass them a temporary copy of the data for them to display and
munge about. If OK is pressed, the client of the form does something
with the temporary da... more >>
How to load resource strings?
Posted by msnews.microsoft.com at 11/20/2006 10:01:16 PM
I am writing my first managed project and I am a bit confused in loading
resource strings. In old unmanaged C++ if I had a resource string in my
rc file called GX_ERR_DEVICE_ALREADY_OPEN. I would simply call:
int LoadString(HINSTANCE hInstance,
UINT uID,
LPTSTR lpBuffer,
i... more >>
Implementing properties in an unmanaged class (in a managed project)
Posted by Mark Ingram at 11/20/2006 2:17:01 PM
Hi, can anyone tell me why I'm getting the following error:
error C4980: '__property' : use of this keyword requires /clr:oldSyntax
command line option
&
error C3813: a property declaration can only appear within the
definition of a managed type
Here is my code:
#pragma once
... more >>
Managed pointers to pointers
Posted by Mark Ingram at 11/20/2006 12:44:38 PM
Hi, I've been trying to update some old C++ code and when i came across
this:
MyClass** ppOut
I changed it to:
MyManagedClass^% ppOut
However - it doesn't work exactly the same because I am unable to pass
nullptr for one of those parameters. How can I replicate pointers to
pointe... more >>
can't reference *literal* in an unmanaged function???
Posted by Ben Voigt at 11/20/2006 8:38:26 AM
This smells like a bug to me, since literals are substituted at compile
time. I'm using VS2005 SP1 beta.
// literal_unmanaged.cpp : main project file.
ref class TheClass
{
literal int ExitCode = 0;
};
#pragma unmanaged
int main()
{
return TheClass::ExitCode;
}
1... more >>
sending emails using C++.Net
Posted by lizii at 11/20/2006 8:20:24 AM
Hey there - hopefully last newbie question i will ask for a while!
I want my application to work where you click a button - and it either:
a) open a email application - insert the correct email address and add
a subject + any attachments
or
b) just create an email and send it off with appro... more >>
app won't run after adding an empty class
Posted by Dave Calkins at 11/20/2006 6:59:01 AM
I'm wriiting an MFC C++ application which uses a third party C# .NET API via
a DLL. The app runs fine. If I add a new, empty C++ class, and compile/link
it refuses to run, complaining about not being able to load an assembly.
Removing the class from the project and doing a rebuild all gets ... more >>
I can't understand! my program report Error random when click X.
Posted by chris at 11/20/2006 1:47:33 AM
can anybody have some ideas?
... more >>
why this? Exception code: C0000005 ACCESS_VIOLATION
Posted by Vasuki at 11/20/2006 12:52:02 AM
Hi
My application crashes all of a sudden giving me the following error.
Can anybody help please?
Exception code: C0000005 ACCESS_VIOLATION
Fault address: 77FCE005 03:00002005 C:\WINNT\system32\ntdll.dll
EAX:17020000 EBX:16400000 ECX:0000037F EDX:00000020 ESI:04120000 EDI:16FA0AD8
CS:EI... more >>
whats wrong with this stack
Posted by abubakarm NO[at]SPAM gmail.com at 11/20/2006 12:04:23 AM
Hi,
There is a strang bug appearing not-so-often in my application. I'm
pasting the stack calls window contents when my app crashes. Following
it is:
msvcr80d.dll!fastcopy_I(void * dst=0x01e46130, void * src=0x00001280,
int len=0) + 0x4b bytes C
msvcr80d.dll!_VEC_memcpy(void * dst=0x01e46... more >>
Defining property getters and settings in cpp file
Posted by Mark Ingram at 11/20/2006 12:00:00 AM
Hi, does anyone know if it is possible to define the function body of a
getter and setter in the .cpp file?
I have tried this, but it doesn't work (Error 1 error C2039:
'get_VolumeDataList' : is not a member of 'VolumeInfo'
d:\\VolumeInfo.cpp 7)
VolumeInfo.h
property List... more >>
C++ constructors with parameters using in Visual Basic?
Posted by msnews.microsoft.com at 11/19/2006 10:25:30 AM
I have a constructor with parameters.
__gc public class GpsUsbDevice : public GpsDevice
{
public:
GpsUsbDevice(String* DeviceName)
{
}
}
I want to be able to use the resulting .NET DLL in Visual Basic. But
Visual Basic does not allow Dim New with parameters does it? I... more >>
[WindowsForms] Horizontal Line
Posted by pocketom at 11/19/2006 9:39:02 AM
Does anybody know how i can put a horizontal line into my forms? i need one
to create a simple "below the line" to seperate my sumup textbox from the
other input-textboxes (like you know it from common calculations). I tried to
add a label with underlines ________, but doesn't look very pretty... more >>
calling managed c++ from an unmanaged mfc application (VC 7.1)
Posted by Arne Adams at 11/18/2006 5:52:47 PM
Hi,
I try to use a C# Dialog in a legacy MFC application.
The problem seems to boil down to the following:
from an unmanaged console application I can call any function of the managed
bridge - if I try to do the same from my mfc application the application
won't start
'SeaMain.exe': 'E:\WIN... more >>
Using .RES files with DLL projects?
Posted by Rich at 11/18/2006 7:21:01 AM
I have seen DLL projects use .res files so that when you look at the
properties of the DLL file from Windows Explorer you can see things
like file version, description, copyright, etc.
My question is how do you do this? (specifically, using MS C++ 2005
Express).
I have found hints in MSDN ... more >>
DLL exported functions Issue
Posted by Mohammad Omer at 11/18/2006 3:35:28 AM
I am writing code for creating DLL using vs2k5. My project is using
Crypto++ lib project, which has a function (ComputeHash), and with the
same name of function I have written in project with a little bit
change as follows
Crypto++ function:
protected: unsigned int __thiscall
CryptoPP::Defla... more >>
Graduate-Level OnLine Visual C++ Course ?
Posted by kalos at 11/17/2006 10:53:12 AM
I'm looking for an online (distance) Visual C++ course that can be taken
as transfer credit for a Master's degree in Electrical
Engineering/Technology.
The student is familiar with C and C+ and is currently doing embedded
microprocessor system development. To get her employer to pay tuition
... more >>
Problem finding DLL
Posted by Rich at 11/17/2006 8:30:20 AM
I am trying to use unmanaged DLLs within managed code. My approach is
to create a managed DLL with wrapper functions for my unmanaged
functions. The unmanaged functions come from an unmanaged DLL.
I can successfully build my managed DLL and use it from managed code.
However, at runtime the c... more >>
hash code generating algorithm.
Posted by lavu at 11/17/2006 7:59:45 AM
I am trying to provide some security to text files, by adding a
signature
at the end of each text file.
this signature needs to be generated by some kind of
hashing algorithm. so while sending the file,
i will sign the text file and at the receiving end,
the text file will be checked to make s... more >>
ThreadPool Error Compiling, Pointer To Member.
Posted by gnassar NO[at]SPAM gmail.com at 11/17/2006 12:14:24 AM
This question is prob. extremely trivial but I can't seem to find out
what is going on. I've been doing some basic work with Multithreading
and Worker Threads and have determined I'd like to set up a minor
project that has ThreadingPools.
I can't seem to get it to compile whether I follow the ... more >>
|