-
- How do I allocate memory for a String^?
by Corey Was Here
- 7 Replies
- Last post
by n0n4m3
- I've created a class containing a System:: String^ variable, but everytime I try to set it equal to a value I get a Null execption error. I was just wondering if someone could tell me how I allocate the space to set it equal to another String^ value. Any help would be appreciated. Thanks.
-
- Filling a SAFEARRAY with strings and passing to VB6 Variant
by Conflict
- 1 Replies
- Last post
by Scott McPhillips
- Hi,
This question has probably been answered before.
I am currently writing a VC++ dll which has an exported function to return a SAFEARRAY filled with strings back to a VB6 application to action.
Passing back doubles, floats, integers I can do but I am totally stumped on how to return an array of strings, these strings being email address selected from the MAPI address book.
-
- Problems using GetProcessesByName in C++
by little miss confused
- 10 Replies
- Last post
by Simple Samples
- Hi All,
I'm trying to write a piece of code to search for all system processes by name
To do this, I'm using :
array <Process^>^matches = Process::GetProcessesByName("notepad");
The problem is, I don't want to use a hard-coded value to search for, I want my function to accept the name of the process as a parameter.
However :
string procName =
-
- Problem in fread and fwrite function
by Dravid
- 5 Replies
- Last post
by Simple Samples
- Hi, In my project simply encrypt data using XOR operator ,Then write encrypted data in file using fwrite function in MFC. No problem in Decryption if successfully retrive data from encrypted file until EOF. But some time encrypted file automatically return EOF after postion of data retrive,This postion data also decrypted successfully. For example , File1:Input File size(6kb) FIle2:Encrypt File s
-
- PSDK/calc-sample, please.
by BJohnKenn
- 5 Replies
- Last post
by BJohnKenn
- Below is error when I try to build sample project: Calculator.
I have VC++ express edition and sample is for that version of C++.
I also have PSDK which I wanted to integrate with VC++ express edition by following instructions; but wanted to be sure VC++ express edition is working (which it is not) by using simple sample projects.
Thank you very much for any assistance to get this sample
-
- Loading a resource from a DLL
by RedKMan
- 3 Replies
- Last post
by RedKMan
- My resources such as Window icon and cursor are inside a DLL file. If the resource.h and .RC file are stored locally in the same project when creating the Window you just use:-
wndclass.hIcon = LoadIcon( hInstance, MAKEINTRESOURCE( IDI_MAIN_ICON ) );
wndclass.hCursor = LoadCursor( hInstance, MAKEINTRESOURCE( IDI_MAIN_CURSOR2 ) );
I've noticed there is a function called FindResour
-
- GetPathName can't convert to const char
by parreg
- 5 Replies
- Last post
by Nishant Sivakumar
- Hello,
I have a variable defined as CFileDialog dlg (....)
When I go to send it to a program to handle the filepath :
function(dlg.GetPathName()) where funciton is:
function (cons char *fullpathfilename) I get the error during compile for:
"cannot convert parmeter from Cstring to "const char".
Now this same code works on one machine but not
-
- About XmlTextWriter
by JGLP
- 8 Replies
- Last post
by JGLP
- Hi how can i write (and read) to a XML file on this format: <color id="red"> </color> If i use: DataWrite->WriteElementString("color","red"); will appear like: <color>red</color> and if i use: DataWrite->WriteStartElement("color",nullptr,"red"); will appear like: < color xmlns:color =" red "> tha
-
- Special config to develop for 2003 R2 under XP?
by jgsenecal
- 2 Replies
- Last post
by Simple Samples
- Hi All, New to Windows Development here. I have some C++ code that I'm developing under Windows XP, that I need to run under Server 2003 (R2). It's fairly simple--a console application that does nothing fancy. My problem is that it runs fine under XP, but under 2003R2 I get an error message (dialog box) saying the application is not configured correctly, and that reinstallation may help. I'm at a
-
- Terminate thread
by dellthinker
- 11 Replies
- Last post
by dellthinker
- Hi all. Im trying to find out a way to terminate a thread. This is my basic setup
Code Block
/* This is where i create the thread. */ HANDLE function1; function1[1]=CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)startup,&a,0,0); /* And here is where i want to terminate it */ BOOL TerminateThread(HANDLE function1, DWORD status); Can anyone tell me what im doing wrong Because the
-
- Using a Windows Form User Control in MFC
by KORT
- 1 Replies
- Last post
by Bite Qiu - MSFT
-
Hello VC++ Forum,
Our application is written in C++. And we are looking to develop a C# User Interface for It. So we try to host a windows form user control as an MFC view.
By default, MFC application is based on the Document/View Architecture.
In order to create an MFC application hosting a winform, here are the step by step instructions:
-
- How to detect the versions of MFC8 installed
by Lo&#38;&#35;23
- 0 Replies
- Last post
by Lo&#38;&#35;23
- Hi all
I'd like to detect in my program (written using WIN32/MFC8.0RTM) what are the differents versions of the MFC 8 installed on the computer. (so far there can be the RTM or SP1)
If I'm right, these DLLs can be either in the WinSxS directory (for XP and later) or in the System32 one for Win2K.
Is there an API to enumerated installed Shared Assemblies Does it works on Win2K
Is t
-
- dhcprequestparams api direction
by SullivanIndy
- 4 Replies
- Last post
by Bite Qiu - MSFT
- Can someone please help me understand what I would need to do to make this example using dhcprequestparams into a functional program
http://msdn2.microsoft.com/en-us/library/aa363345.aspx
I have install Visual Studio 2005 Express and the Windows SDK. Need some direction in c++.
Thanks -
-
- namespace std - problems
by osarsif
- 2 Replies
- Last post
by Simple Samples
- When I'm creating console application, everything is correct, but when CLR: Windows Forms App I cannot use namespace std.
For example this...
---------------------------------------
// vec3.cpp : main project file.
#include <vector>
#include <list>
#include <stack>
/* ... */
#include "stdafx.h"
#include "Form1.h"
-
- Memory Leak
by J. A. Love
- 7 Replies
- Last post
by Holger Grund
- I have a fucntion that randomly selects a file from an ArrayList of filenames and sets that file as the desktop background (i know that all files in the ArrayList are image files). However, everytime this function is called, memory gets leaked.
Code Snippet
void changeWallpaper(){
Random ^randNum = gcnew Random();
String ^imageDest = gcnew String(Directory::GetCurrent
-
- LNK1104: cannot open file libc.lib
by Sunny H
- 12 Replies
- Last post
by fireballgfx
- I have a project built well with VC++ 6.0. The project is built with mutlti-threaded DLL and the project depends on 4 specific libraries and serveral rouge wave libraries. Now I try to build it with VS2005 and get the linking error "cannot open file libc.lib". It seems our specific libraries is built with single-threaded DLL, I am not sure, but that is what I want to find out. I used /VERBOSE to
-
- Cannot find "COREDLL.DLL", why?
by tzkm
- 14 Replies
- Last post
by Holger Grund
- Hi,
I got an error as denoted in subject. Is there anyone help me resolve the problem Thanks.
Here is my environment:
===========================
OS: windows 2003 standard sp2
IDE: VS 2005 profectional
APP: windows MFC
===========================
-
- VC++ won't run from source control: "The system cannot execute the specified program"
by MrTools
- 14 Replies
- Last post
by Damien Watkins - MSFT
- Hi, I've installed VS 2005 C++ Express into source control and it won't work. I've wasted the better part of a day so far trying to get it to work. The error message I get when trying to run something as simple as lib.exe is: "The system cannot execute the specified program." When I load up the .exe in the dependency walker (depends.exe), it says: Error: The Side-by-Side configuration i
-
- Can't solve this algorithm
by Bilal Ilyas
- 1 Replies
- Last post
by crescens2k
- I want the C++ code for below given algorithm if anyone can help it will be very greatful
1: Input the Fitness Value of all individuals, f ( i ) ( i = 1,2,3,.....L), population size,L
2: Intilialize the population counter,i = 0 and initialize the selection counter, j = 0
3: Increment the selection counter,j = j+1
4: find y = f ( j ) / [sum( f ( i ) where i...L ) / L ]
5: S
-
- Message in Reverse order ( MFC )
by Amir__
- 2 Replies
- Last post
by Ovidiu Cucu
- hello
i want to send message from FrameWindow to View class. Actually i want that after execution of handler function against some event in FrameWindow class my application also receive same event in View class,
My application is MFC application in Visual C++
is it possible if yes then how
-
- Newbie! Load, display and transcode files such as BMP (bitmap), jp2 (jpeg 2000 format)? Using jasper implementation
by keyesarone
- 2 Replies
- Last post
by Aleksandr Tokarev
- Hi !
i request code sample from someone who can able to convert images into jp2(JPEG 2000) format
MFC application using the document/view architecture that can load, display and transcode files such as BMP (bitmap), jp2 (jpeg 2000 format).
cheers!
keyesar
-
- How to display char to a label?
by Kamwing
- 12 Replies
- Last post
by Kamwing
- The following is my code const unsigned char *pa; const unsigned char *pb; unsigned char pc; pa = ascBitmap8x15('l'); pc = *(pa+4); label3->set_Text("String Type"); I would like to ask how can I display the unsigned char pc to the label3 using the method set_Text
-
- Project type for ISAPI filter in VS.NET 2005
by kalai
- 4 Replies
- Last post
by kalai
- Hi,
I am planning to write ISAPI Filter. I looked into the articles over web. In Visual Studio 6.0, there is a project type ISAPI Extension Wizard.
What is the project type in VS.NET 2005 of course C++ is the language.
Your help is very much appreciated.
Thanks & Regards, Kalai
-
- sorting struct
by Anon4ymous12345
- 11 Replies
- Last post
by Simple Samples
- I have defined a structure at the top with s1...s4 , a, d. I n the main message handler case paint i have calculated s .a and have stored them in the structure at "a". Now i would like to sort the structure objects with respect to "a" & give out the 5 smallest "a" values. But the porblem i am facing is that i need to move the entire structures not only "a&qu
-
- Binary Reading from a file
by James2007
- 1 Replies
- Last post
by Bite Qiu - MSFT
- Interesting!
//Convert 64bits of raw binary data in a character array to a 64-bit unsigned integer // //data: array containing the required data //index: index into the array that the integer data starts //returns: the converted integer value starting at index // unsigned long long CharArray2Int64(char *data, int index) { return *(reinterpret_cast<unsigned long long *>(data+ind