all groups > visual c > june 2005
Filter by week: 1 2 3 4 5
Byte Array not compatible.
Posted by Bill at 6/30/2005 4:27:06 PM
Can someone tell me how to get the below code working please.
System::Byte * enced = new byte[Data->Length];
///.. copy data in to array. (omitted)...
//Now pass to memory stream constructor
MemoryStream * ms = new MemoryStream(enced );
I get an error
cannot convert parameter 1 from 'unsi... more >>
FindFirstFile and FindNextFile
Posted by Paulo Eduardo at 6/30/2005 3:52:05 PM
Hi, all!
We are devleping one app that will use disk access with FindFirstFile and
FindNextFile for it. Can someone expose me how works FindFirstFile and
FindNextFile in disk access? Does the findFirstfile read all files of disk
and put in physical memory , and FindFirstFile read files fr... more >>
c calling a fortran subroutine
Posted by RichN at 6/30/2005 12:01:03 PM
I am developing a c program in Visual Studio .NET 2003. I also have an
Intel(R) Fortran compiler for MVS .NET
My fortran sourcecode already existed. I started a new fortran project and
chose to create a dynamic link library. The beginning of the fortran code
looks like:
SUBROUTINE SFTC... more >>
array as output parameter ???
Posted by (cmrchs NO[at]SPAM yahoo.com) at 6/30/2005 8:48:50 AM
Hi,
I have a function that creates an array and want to use that array in the client.
but what is the syntax in C++.NET 2005 to specify an array as output param of a function ??
ref class Test
{
void OutputParam(array<int>^ intArr)
{
intArr = gcnew array<int>(3);
for(int i=0; i<int... more >>
install component in GAC ??
Posted by (cmrchs NO[at]SPAM yahoo.com) at 6/30/2005 8:42:29 AM
Hi,
using the setup project in VisualStudio : I add an exe that uses a component so I add the component to the setup-project as well
but how can I specify that the component must be installed in GAC when the client runs the setup for the application ?
(so far is it only installed in the direc... more >>
casting &Byte[] to long value
Posted by Carl at 6/30/2005 8:00:03 AM
Hi,
I have an array of bytes like
Byte m_Data[] = new Byte[2000] ;
Byte sequences starting at a random index (4 byte aligned) should be
interpreted as unsigned long values and compared with each other.
My first try was
if ( reinterpret_cast<UInt32*>(&m_Data[20]) ==
... more >>
FILE and line feed question
Posted by james at 6/30/2005 7:17:04 AM
I'm using "FILE" function to write an array in a file and in this way I see
that when is present a line feed (10) the function automatically insert a
carriage return(13). This cause an error when i try to read the file. I would
like to know why this carriage return is inserted and if is possib... more >>
MSVCRT.DLL
Posted by Michael at 6/30/2005 6:41:03 AM
Hi!
I've developed a simple game that needs to be compiled as a multithreaded
dll. I've read that since I use this runtime-library my applications will
need MSVCRT.DLL at runtime. Is it possible to perform static linking with
MSVCRT.lib or do I have to ship MSVCRT.DLL together with my .exe?
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Shell Compressed Folder
Posted by Vladimir Nesterovsky at 6/30/2005 12:00:00 AM
Hello,
I'm having a trouble with a Shell.Folder object when I'm trying to use it
from a C++ application, but at the same time, the same object works fine
from within html script.
The effect is that, I cannot put data into a compressed folder in C++, in
spite of the fact that all operations ... more >>
Managed and unmanaged C++: error LNK2020: unresolved token
Posted by Roland at 6/29/2005 8:54:54 PM
Hi,
ultimately I want to call some unmanaged C++ class that contains some
DirectShow code of mine from my C# classes, but for the time being I'd
be happy if I could get this to build! I have read the other topics on
the same problem here on the groups but haven't found the solution to
my prob... more >>
Link error: missing function AlphaBlend from msimg.dll
Posted by noleander at 6/29/2005 5:25:02 PM
I'm trying to call the Microsoft image-processing function AlphaBlend() in my
Visual C++ application. My software compiles okay, but gets a link error
(details below) that says it cannot find the symbol AlphaBlend().
I'm calling dozens of other Microsoft bitmap and imagery functions withou... more >>
Dataset.Tables property
Posted by Rasika WIJAYARATNE at 6/29/2005 5:18:01 PM
Can someone tell me what I'm doing wrong here:
DataTable^ table = safe_cast<DataTable^>myDateSet->Tables[0];
I am getting a compilation error.
Rasika.... more >>
Forward declarations and #pragma managed/unmanaged
Posted by Gustavo L. Fabro at 6/29/2005 3:14:11 PM
Greetings!
Going directly to the point:
myclass.h:
//--------------------------------------
#pragma managed
//Forward declaration
class AnotherClass;
#pragma unmanaged
class MyClass
{
public:
void func1(AnotherClass* ptr);
}
Will this '#pragma managed' before '... more >>
Can't Link Mixed DLL with Visual Studio
Posted by andrew.bell.ia NO[at]SPAM gmail.com at 6/29/2005 10:52:59 AM
Hi,
I'm trying to link a mixed (CLR and native) DLL with visual studio. I
have it working fine on the command line, where cl is used to invoke
link, but I can't get it to work with VS. I get:
unresolved external symbol: __CorDllMain@12
I am linking in msvcrt.lib and msvcprt.lib explicit... more >>
Fork() on windows?
Posted by Susan Baker at 6/29/2005 10:38:27 AM
Hi,
I'm converting some Unix code to Windows. I need to fork() in a section
in my code. Nearest Windows functionality is CreateProcess().
Any ideas or guidelines (gotchas) on best practices/how to procedd?
Thanks
... more >>
build same dll but checksum different each time?
Posted by gameMaker at 6/29/2005 10:38:03 AM
I need to be able to build my code into a dll where the checksum of the dll
is the same everytime I build it. In other words, the same exact code gives
me a different checksum each time I build it.
Does anyone know why the dll would not be the same every time? Is it adding
a timestamp in ... more >>
Default Printer Changed Event
Posted by Microsoft News Server at 6/29/2005 9:00:07 AM
I know that it's possible to register with the OS to receive certain file
system events. Does anyone know if it's possible to receive an event when
the user changes the default printer setting? Thanks.
Jerry
... more >>
arrays are simple ???
Posted by (cmrchs NO[at]SPAM yahoo.com) at 6/29/2005 8:37:24 AM
Hi,
I try :
short ^arrShort = gcnew short [MAX];
arrShort[0] = 1; --> COMPILER ERROR
error C3915: 'System::Int16' has no default indexed property
(class indexer)
WHY ?
how can I put a value at the first position ?
thanks
Chris
***************************... more >>
Managed C++ equivalent for Foo([in] VARIANT_BOOL b, [out, retval] VARIANT *ptr)
Posted by Boris at 6/29/2005 12:00:00 AM
I have an interface in Managed C++ where one of the methods is this one:
Object *Foo(Boolean *b)
When I use tlbexp to check the IDL the line above is converted to:
HRESULT Foo([in, out] VARIANT_BOOL *b, [out, retval] VARIANT *ptr)
However I need:
HRESULT Foo([in] VARIANT_BOOL b, [out,... more >>
How to trobleshoot slow link time
Posted by Chris Stankevitz at 6/28/2005 9:36:42 AM
My very large native C++ app takes a long time to link (approaching five
minutes).
How can I troubleshoot *why* it takes so long to link? I'd like to look for
ways to reorganize things to speed up the link.
Thanks,
Chris
... more >>
IExtractImage error in Windows 2000
Posted by Ed Neary at 6/28/2005 9:35:13 AM
When I attempt to extract a thumbnail from a simple JPG in Windows 2000 I get
an error. This works fine in Windows XP and 2003 Server.
The error is 0x80004002 - "No such interface supported".
I have called ::CoInitializeEx(NULL, COINIT_MULTITHREADED); before running
this code.
Below i... more >>
simple modal dialog
Posted by Burt at 6/28/2005 12:00:00 AM
I need to put up a simple modal dialog, and am surprised how hard it seems
to be. Am I missing something here?
I have created a dialog resource IDD_DELETE_S9. It has some static text
plus 3 buttons. The buttons have ids of IDOK, IDCANCEL and IDC_RENAME. All
I want to do is put up this mo... more >>
Linker errors in VC7 when using RichEdit view
Posted by Senapathy at 6/28/2005 12:00:00 AM
VC++ .NET 2003 Standard Edition
Win XP, SP2
Hi,
I have a code that builds under VC6.0, but fails to link in VC7.1.
The offending code is as follows:
_AFX_RICHEDIT_STATE* const pEditState = _afxRichEditState;
The linker errors are:
----------------------
LVBaseDetailsView.obj : ... more >>
Keyboard logging functionality
Posted by Stephen Corey at 6/27/2005 3:46:35 PM
I need to write a program that launches Internet Explorer, then counts
how many <ENTER> keys are pressed inside IE. I've seen a lot of
references to the SetWindowsHookEx() API call, but all sources I found
seem to be piece-meal and incomplete. I'm using VC++ .NET, and would
rather avoid usin... more >>
Visual C Express Edition 2005 on making dll.
Posted by falcon22 at 6/27/2005 3:37:02 PM
I can not make a dll. file in Visual C++ Express Edition 2005. It wont let
me. Is there any way to make one. Am I able to make one with this edition?
Thanks.... more >>
How to disable buffer security (/GS) for a particular function?
Posted by John at 6/27/2005 12:06:55 PM
Hi,
I know, this question was posted a year ago (link below).
I wonder whether Microsoft changed it's mind and
fixed check_stack pragma to disable buffer security
for a single function.
I would hate to disable the security for the whole project
(or module) because of a single function.
Th... more >>
how to mark an object for garbage collection ??
Posted by (cmrchs NO[at]SPAM yahoo.com) at 6/27/2005 9:49:53 AM
Hi,
how do you mark an object for garbage collection in C++.NET 2005 ?
MyDbClass^ obj = gcnew MyDbClass();
// Release the object
obj = 0; --> COMPILER ERROR
obj = nullptr; // nope : this does not mark it for garbage
// collection (see help)
so ... ... more >>
Printing multiple pages
Posted by Marcelo at 6/27/2005 7:50:30 AM
Greetings.
I develop a multiple forms applications with Microsoft Visual Studio
C++ .NET 2003 and I'd like to know how can I print more than one page
in my application. For printing one page, I do:
private: System::Void button1_Click(System::Object * sender,
System::EventArgs * e){
if(p... more >>
Using a managed Dll from an unmanaged Win32 .EXE
Posted by CharlesHenri at 6/27/2005 7:43:35 AM
Hello,
i plan to use a managed dll containing WinForm classes in an unmanaged
win32 exe.
Starting from NOTHING, how do i have to proceed ?
I have found the following tutorial on microsoft.com :
"Converting Managed Extensions for C++ Projects from Pure Intermediate
Language to Mixed Mod... more >>
Loader Lock issue
Posted by Phil Atkin at 6/27/2005 12:00:00 AM
I'm really struggling with this issue. I can see it's complex, but given
the difficulty in reproducing it it's really essential that the advice
provided is bullet-proof and very clear. So far, I can't follow the advice.
My situation is this: I have followed MS recommendations to convert my
i... more >>
MultiLine TextBox
Posted by Jazzkat at 6/26/2005 8:00:36 PM
Hello Folks,
Please help me. I am trying to send data to a multi-line textbox one
character at a time. However, the text box is not showing a continuous
stream; instead, it is showing only the single character each time I write
to the text box. How do I show a continuous stream?
Learner
... more >>
Cpu Usage (Second Posting)
Posted by Paulo Eduardo at 6/26/2005 2:13:01 PM
Hi, all!
Thanks a lot for your responses. We are using the GetProcessTimes for
calculation of cpu usage. We are using the following calcution for get cpu
usage:
(((NUserTime - OUserTime) + (NKernelTime - OKernelTime))*100) / (NTime -
OTime)/NumProcessors,
where
NUserTime - is the... more >>
conversion operators (operator keyword)
Posted by Egbert Nierop (MVP for IIS) at 6/25/2005 10:44:46 AM
Example...
This would make that i can assign a ULONG to a CComBSTR2 class while the
body of the code performs necessary conversion.
CComBSTR2& operator=(ULONG ulong)
{
}
QUESTION: Can I do it the other way around as seen below?
// code below does compile but still has no ... more >>
VC Express and COM problems
Posted by RYoung at 6/25/2005 4:21:19 AM
Hi all,
Using VC Express Beta 2,
Just a simple class so far cause I can't get past this error:
error C3861: 'CoInitialize': identifier not found
public ref class Class1
{
public:
Class1()
{
CoInitialize( NULL );
}
... more >>
vc++ beginner help
Posted by Singaravelan Subramaniam at 6/24/2005 11:12:01 PM
Dear friends,
I'm fresh in VC++ .NET. Console::WriteLine(S"Welcome to VC++.NET");
Why it's use "S" in it?
regards
Singaravelan... more >>
String concatenation
Posted by Owen Corpening at 6/24/2005 3:06:13 PM
the String class is required in .Net yet it doesn't seem to provide suuport
for the "+" operator, you have to litter your code with "String::Concat"
everywhere you want to concatenate strings.
Does everyone use other string classes and just convert at the end when they
have to pass a String? W... more >>
Convert _Recordset to DataSet/DataTable
Posted by B. Salmon at 6/24/2005 2:31:00 PM
I have a Visual C++ .NET function that is calling an unmanaged function that
returns an ADO _Recordset* object. I want to be able to convert that into
an ADO.NET DataSet (or DataTable). I tried to use the OleDbDataAdapter.Fill
method, but I could only get that to work if I gave it an
ADODB... more >>
Can't figure out problem
Posted by James Park at 6/24/2005 12:51:34 PM
I'm trying to delete off a 0-byte file that gets created after trying to
download from a bad URL, but I'm getting an IOException that says that it's
being used. I also noticed an InvalidOperationException before the
IOException in the debug output, but I can't seem to try/catch where that
co... more >>
IFont <-> System::Drawing::Font
Posted by Phil Atkin at 6/24/2005 12:45:35 PM
(Posted here because nobody wants to answer me in framework.interop, and I
_am_ using VC++!)
IFont to System::Drawing::Font is easy enough: get the hFont property and
then use Font::FromHfont.
But how can I go from a Font to a corresponding IFont?
TIA
Phil Atkin
... more >>
MessageBox in managed C++ v.8 (Beta2)
Posted by Sergey Muschin at 6/24/2005 12:12:41 PM
MessageBox in managed C++ v.8 (Beta2)
Hi there!
I'm having problem using of MessageBox class in my CLASS LIBRARY.
I have added reference for System.Windows.Forms but still and all....
Thank You
Regards.
... more >>
CPU usage
Posted by Paulo Eduardo at 6/24/2005 11:28:03 AM
Hi, All!
We are developing one app for windows 95/98/Me/NT4.0/2000/XP/2003 using
Visual C++ 6.0. We need to set the % of CPU Usage to app process. Is there
an API to set % of CPU Usage? Can Someone help us?
Thanks in advance.... more >>
Memory Write Breakpoint in vc7
Posted by Anil Aksay at 6/24/2005 1:25:40 AM
I need to put a breakpoint when a particular memory location is
written. To be more specific I want to know when 0 is written onto that
memory location. Is there a way to do it in vc7?
Regards,
Anil.
... more >>
Lauching an App and using the Exit Code
Posted by Micus at 6/23/2005 4:03:30 PM
Greetings,
I need to execute 2 applications from an application or batch file. The
first app launched has the user enter a product key and the app's exit code
will be 0 (failed) or 1 (succeeded). Based on the exit code of the first
app, the second app will be run.
My problems :
... more >>
"Hello World" to "Hello\sWorld"
Posted by ME at 6/23/2005 12:28:11 PM
I am trying to find a prewritten method for converting a string like
this:"Hello World" to this "Hello\sWorld". I plan to use it to build a
regular expression. Specifically I am looking for a method that can convert
not just space (\s) but also any character that needs to be escaped in a
... more >>
How to handle resources in mixed managed/unmanaged C++ projects?
Posted by Steve at 6/23/2005 11:55:02 AM
I have former VC++ 6.0 application which was ported to .NET.
Now we continue to develop this app under VS.NET. The app
now contains both managed and unmanaged classes.
Now I have a problem with usage of resources in managed classes.
For example I want to display warning message and want to loa... more >>
RegEdit
Posted by German at 6/23/2005 9:17:02 AM
How Can I recover data from REgEDIT since Visual C++ 6.0 ?
Thanks in advanced ... more >>
delete files using CFile ?
Posted by German at 6/23/2005 9:11:07 AM
Hi Team :
I do no know the procedure to delete file using CFile ?? or any other way
(command or procedure) to reach this action.
Thanks in advanced
... more >>
Get the MACAddress from the computer
Posted by akayoku at 6/23/2005 1:19:37 AM
Hello all,
I'm working on a school project to make a security program. I need to
get the MAC Address from the computer. That is the "Physical Address"
when you type "ipconfig/all" in MSDOS command prompt.
It is urgent and I have spent pretty much time there, but still don't
know what to ... more >>
what's wrong with this !
Posted by Droopy at 6/23/2005 12:00:00 AM
I am making a managed C++ wrapper for calling legacy C++ code from C#.
I don't understand what's wrong with following code :
__gc public class SerialBuffer
{
private:
unsigned char __nogc*_buffer;
short _bufferNr;
bool _isUsed;
int _length;
public:
SerialBuffer (short buff... more >>
Debug VC++ dll?
Posted by Bob at 6/23/2005 12:00:00 AM
Hi,
I am a vb.net programmer who has written a simple VC++ dll that I call from
my vb program.
How do you get to step into the VC code when debugging?
I have tried putting the compiled dll into the output directory of the vb
project.
I have tried setting the attach attribute under C++ project... more >>
|