|
hiya is there a way to set a dos prompt to default another drive or directory instead of the c:\
thanks,
grahamoj.
|
|
|
|
|
from run in the start menu:
command /k d:
if you want to default to some directory, you can put it in a batch file.
test.bat:
d:
cd d:\mydir\thisone\
then do:
command /k test.bat
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Aren't they all. Ok, actully I am not sure as to why I am getting this, or even what it really means. I am simply writing a MC++ assembly that does some data access. There error points to this line here:
mySQLConnection = new SqlConnection(S"server=local;Trusted_Connection=yes;database=DeveloperNotes;");
However I have this declared above it:
SqlConnection * mySQLConnection;
I have included the following:
#using <mscorlib.dll>
#using <system.data.dll>
#using <System.Xml.dll>
using namespace System;
using namespace System::Data;
using namespace System::Data::SqlClient;
using namespace System::Xml;
Does anyone have any ideas about this error?
c:\Documents and Settings\User\Desktop\new_article\mcpp\mcpp.cpp(18): error C3624: 'System::ComponentModel::Component': the compiler cannot find this type; it is defined in the assembly 'System'
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
Geez, I decided to walk away and came back to my computer 2 hours later, looked at my screen and realized that I was missing this statement:
#using <System.dll>
All Fixed.
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
It's because SqlConnection is derived from Component, and the types reside in different assemblies.
Nick
This posting is provided “AS IS” with no warranties, and confers no rights. You assume all risk for your use. © 2002 Microsoft Corporation. All rights reserved.
|
|
|
|
|
Nick,
First off thanks, I don't want to bug you however it doesn't seem like this forum gets as much attention as some of the others. Could you take a look at thread I posted above: http://www.codeproject.com/script/comments/forums.asp?msg=346059&forumid=3785#xx346059xx[^]. I have no idea why I am getting 0 back all the time. This code, once it works will be a class written in MC++ and instantiated in C# as a web service. I hadn't seen anything like it yet so I thought it would be interesting to try. Thanks.
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
Hi,
I have been working with turbo C++ for sometime...But I have not come accross a method to connect a C++ prog to any database. Could anyone help me on this?
Thank you in anticipation.
Sreejit
|
|
|
|
|
ADO, DAO, OLE DB, ODBC. http://msdn.microsoft.com[^]
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I just created a C++ Managed Web Service and now it's residing on my
'Localhost'. I want to copy it to another web server, but I cannot
find the "Copy Project" option under the "Project" menu. (This option did exist when I was working with ASP.NET applications, but I can't find it when I work with C++ web applications/services)
I also tried creating a Web Deployment project, but I realize that I
cannot run the Windows installer file on the other server because it
belongs to my web host. It is not my own server. After copying the
installer files to that server, I do not know how to remotely execute
it.
How can I work around these problems to deploy my web service on that
server? Thanks.
|
|
|
|
|
Need help with making a C++ program. If anyone is really good with it and can help me out, add me on MSN messenger or yahoo messenger. Thanks
hiloguy@hotmail.com
the_crazy_nemesis@yahoo.com
|
|
|
|
|
What, ANY C++ program ?
#include <iostream>
int main()
{
std::cout << "hello world";
return 0;
}
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Im trying to use a unmanaged C dll from my MC++ dll and one of the
functions requires a char* string into it.
I have tried:
CMethod ( "String" )
CMethod::CMethod( String* name )
{
const wchar_t __pin* pinName = PtrToStringChars( name );
long result = DllMethod ( (char*) pinName );
}
But the result tells me something is wrong!
however if i hardcode the string
long result = DllMethod ( (char*) "String" );
the result is OK!
Im wondering if it has something to do with the ansi/unicode stuff..
Anyone who can help?
|
|
|
|
|
Does anyone kown how I would go about converting an unmnaged c++ project to a managed c++ project.
|
|
|
|
|
i am having a process obgect and i want to get its id in DWORD how to get that process id from csharp project to managed progect code and how to type caste it into DWORD?
r00d0034@yahoo.com
|
|
|
|
|
can i type caste WPARAM and LPARAM into Int32 or not.
is there any lose of values;
<big><small></small></big> Int32 wp=(Int32)wParam;
Int32 lp=(Int32)lParam;
is there any lose of value if i get wParam,lParam like that?
WPARAM wParam=(WPARAM)wp;
LPARAM lParam=(LPARAM)lp;
r00d0034@yahoo.com
|
|
|
|
|
try it. find out.
"[it was..] one of those evenings when you feel that not only will there definitely be a revolution, but that the Association of Manufacturers will foot the bill."
-- Umberto Eco, Foucault's Pendulum
|
|
|
|
|
i chec it but i could not find ?
plz u tell
r00d0034@yahoo.com
|
|
|
|
|
Don't be so stupid.
I really worry when someone is here for so long and continues to post the most basic questions over and over. Are we failing him by answering ? Would he learn if he had to ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
If you look deep in the bowels of the Platform SDK, you'll see the definition of LPARAM and WPARAM. You'll see that WPARAM is an unsigned integer , while LPARAM is a long . Int32 can handle them because as the .NET C++ reference states: "The size of a signed or unsigned int item is the standard size of an integer on a particular machine. For example, in 16-bit operating systems, the int type is usually 16 bits, or 2 bytes. In 32-bit operating systems, the int type is usually 32 bits, or 4 bytes. Thus, the int type is equivalent to either the short int or the long int type, and the unsigned int type is equivalent to either the unsigned short or the unsigned long type, depending on the target environment." I would take that to mean since .NET isn't 16-bit, that you're pretty safe;]
http://www.ian-space.com/
|
|
|
|
|
i saved lparam and wparam values when a key
(say U)pressed on a perticuler edit box.
i want to use these values of lparam and wparam again on different edit box.in order to see that key
(say U) .
i have to type caste wparam and lparam into int32 thats why i have type caste into WPARAM and LPARAM.
is that code is correct or not for that purpose?
is there any change in logic if yes then plz tell?
LPEVENTMSG lpEvent= (LPEVENTMSG)lParam;
PostMessage(different_hWnd,
lpEvent->message,(WPARAM)wParam,(LPARAM)lParam);
r00d0034@yahoo.com
|
|
|
|
|
Why do you ask the same questions over and over, just rewording them ?
I'd like to know why you want to control/hijack the login process. I'm not going to give any more help on this neverending quest of yours unless I am convinced it does not have a malicious intent.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Hi!
I have a C++ class with a callback function. Now I wanna use this class in .NET enviroment. So according the guide, i wrap it in a managed class.
But the problem is the callback. The unmanaged class must have an ability to callback the managed class. How can the callback function in unmanaged class get the pointer of the delegate(or something like that) of the managed class?
any suggestion?
|
|
|
|
|
|
Is there a way to change the text of a hyperlink in an RTF textbox without altering where the link leads to? For instance, changing links in a block of text to read 'click here' instead of displaying the actual link? I have gone from one end of MSDN to the other as well as every scrap of .NET documentation I can find, and still can't figure this one out. The proggie I'm writing is all .NET so far, and I'd rather not 'mix and match'
|
|
|
|
|
Hi folks
Re: ADO.NET : SqlDataReader : I need to assign retrieved value to C++ variable
I have found the source of the problem expressed in the thread "ADO.NET : SqlDataReader : I need to assign retrieved value to C++ variable":
http://www.codeproject.com/script/comments/forums.asp?forumid=3785#xx309754xx
but do not yet know why it occurs or how I can fix it.
The problem arises with the /clr compiler setting.
Here is the code to illustrate this:
/////////////////////////////////////////////////////////
#include <stdafx.h>
#include <cstdlib>
#include "try_ADONET.h"
//#using <mscorlib.dll>
//#using <system.dll>
//#using <system.data.dll> // This is required for the ADO.NET Provider
using namespace std;
//using namespace System;
int Main()
{
CString busNumberSQL[2];
CString bus = "Hello";
busNumberSQL[1] = bus;
return 0;
}
////////////////////////////////////////////////////////
Without the /clr setting the array of CString busNumberSQL[2] is correctly contructed as is CString bus and the line
busNumberSQL[1] = bus;
works as expected. This can be seen by putting a breakpoint in at
return 0;
and seeing the variables in a Watch. Copy the expanded Watch details (Name, Value & Type) to an EXCEL sheet.
..................
Next, add the compiler switch /clr and rerun the code.
CString bus is constructed correctly BUT something weird happens in the construction of CString busNumberSQL[2].
Now,
busNumberSQL[1] = bus;
results in the address of bus as an integer being assigned to busNumberSQL[1], and look at the Watch details!!
Copy the expanded Watch details (Name, Value & Type) to an EXCEL sheet
Name: busNumberSQL; Value: {Length=2}; Type: ATL::CStringT<char,strtraitmfc<char,atl::chtraitscrt<char> > >[] ...(Note no dimension at end compared to the "no /clr" case.
Next Watch line: [0] 2083454756 __int32
Next Watch line: [1] 3103464 __int32
My conclusion is that busNumberSQL[2] is not an array of CString.
Of course, I need the /clr in order to use ADO.NET!
It seems as though a CString works, but a CString array for some (unknown) cannot even be defined.
Do you have any light for me? (I have not got into your previous post yet on Marshall)
Best regards
Doug.
(In case you are wondering I am very much a beginner with C++ and .NET)
Doug
|
|
|
|