|
Hmm ..then what is the appropriate forum in this site that I should pose the question??? Appreciate your help
hi
|
|
|
|
|
The C++[^] forum.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hi,
Is it possible to create OCX in borlands c++?
if so help me out the way how to do it with an example code snippet
thanx in advance,
zari
|
|
|
|
|
Do you want to write an OCX using .NET, or have you posted in the wrong forum ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
I am new to borlands c++, what i want to know is that any possibility available in borlands c++ to create an OCX component as similar to that of vc++
if theres a possibility how???
zari
|
|
|
|
|
The two pertinent questions are:
1 - why are you asking this in the managed c++ forum and not the Visual C++ forum ?
2 - why are you asking it on a site that is 'your Visual Studo and .NET homepage' ? You MAY find some people here who use Borland, but it won't be very many.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Sorry for the mistake i have done
Tot i can get a solution here.
zari
|
|
|
|
|
I have a VS2005 solution that includes a number of unmanaged c++ library projects, a managed c++ library project that wraps some classes from the unmanaged projects and a c# client project.
I can debug the c# project and step into the managed c++ project but I cant step from there into the unmanaged c++ projects. Anyone know if this should be possible and how I can get it to work?
|
|
|
|
|
Never tried that but my first thought is have you checked the "Enable Debuggers/Enable unmanged code" check box in the project/debug settings?
"When your argument falls apart...resort to name-calling." Red Stateler aka (D)espeir in the Soapbox
Whereas "liberal" is just a moron. Red Stateler aka (D)espeir in the Soapbox
led mike
|
|
|
|
|
led mike wrote: Never tried that but my first thought is have you checked the "Enable Debuggers/Enable unmanged code" check box in the project/debug settings?
Worked a treat thank you
|
|
|
|
|
Hello,
I need to use COM server in VC++.NET 2003 managed code. After using Tlbimp.exe to generate runtime callable wrapper I can use operator new to create instance of MyClass. What do I need to do to query another COM interface from this instance? In regular unmanaged code I just need to call ::CoCreateInstance(…) and QueryInterface(…). What do I need to call in managed code instead?
Please help!!!
Regards,
Leonid
|
|
|
|
|
lafleon wrote: What do I need to do to query another COM interface from this instance?
Can you just call QueryInterface on the instance or can you cast the pointer you got back from the new operator?
|
|
|
|
|
It’s my question. Do you have any code samples?
Regards,
Leonid
|
|
|
|
|
Nope, I am sugesting these are things you can try yourself
|
|
|
|
|
---CODE---
// Split Test: String::Split does NOT work properly when given a # of substrings to return
void splitTest() {
String^ toBeSplit = "a b c d e f g h";
array<String^>^ split = toBeSplit->Split(' ',3);
//Expected: "Count: 3" Actual "Count: 8"
Console::WriteLine("Count: {0}",split->Length);
}
---END CODE---
Am I doing something ridiculously stupid, or is this really a bug?
The equivilent C# code works properly.
|
|
|
|
|
jmlsteele wrote: toBeSplit->Split(' ',3);
I don't know how you got that to compile but the following works as expected
array<wchar_t>^ delim = gcnew array<wchar_t> {' '};
String^ src = "1 2 3 4 5";
array<String^>^ a1 = src->Split( delim);
Console::WriteLine( String::Format("{0}", a1->Length));
a1 = src->Split( delim, 2);
Console::WriteLine( String::Format("{0}", a1->Length));
led mike
|
|
|
|
|
I get no errors, and no warnings when compiling what I posted, and upon further inspection I realise why.
The first entry you get for intellisense is Split(... cli::array<__wchar_t,1> ^seperator) so it's just converting my 3 into a wchar_t.
Now I feel stupid...
Thanks for your help.
|
|
|
|
|
Hello,
I need to use COM server in VC++ .NET 2003 managed application. Tlbimp.exe was used to generate runtime callable wrapper. After that I was able to use this com server in single threaded VC++.NET managed code. What do I need to do to use it in secondary thread? How to pass a pointer to COM interface in to the second thread?
In regular unmanaged code I need to have IStream* and call CoMarshalInterThreadInterfaceInStream(…) in the main thread and CoGetInterfaceAndReleaseStream(…) in the second thread.
What do I need to do to marshal wrapper for this COM interface from one thread to another in managed C++ before this code:
pThreadDelegate = new ThreadStart(0, &ThreadWork::DoSomething);
pThread = new Thread(pThreadDelegate);
pThread->Start();
and inside method DoSomething() of ThreadWork class?
Please help!!!!!!!!!!!!
Regards,
Leonid
|
|
|
|
|
Hello friends,
I have an appication of recording a wave file.
But i want to specify the sound device through which only
the wave file should be recorded. That is if my machine has more than one sound card
then i want to select one (through Programmatically) and record sound from that one only.
How to do that.
Thanks in Advance.
Rahul Kulkarni
|
|
|
|
|
I'm working with managed C++ in VS 2005 and am communicating with a MS Access 2003 databse using the primary interop assemblies. I'm importing and exporting text files to/from the database and I want to apply a format specifcation to them. However, instead of defining a specification in the database itself, I'd like to apply one on-the-fly so my application is not dependant on using a specific database. I've tried using a schema.ini file, but it isn't working for me (I placed it in the same directory as the source/destination text file) and I think that it's because I am not using VBA. However, I could be wrong. I also thought that I might be able to include a "static" or non-growing database in the executable, but I don't know where to start. In any case, I'm looking for possible ideas/solutions and a shove in the correct direction. I'd be grateful for any help.
Thanks
|
|
|
|
|
Sir,
I want to connect the database(Sql Server) to vc++.net programically.I also want to use insert delete update queries in the form .Please help me or please send any link for the problem.
Thanks.
www.codeproject.com/database[^]
the link contains only the connection strings
Please help.
Thanks
|
|
|
|
|
Do you want to know how to do this in C++/CLI, or are you asking in the wrong forum ?
It looks to me like you're asking in the wrong forums, and that you need to go back to that link and really look at all the stuff on offer there.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Sir,
I want to connect the database(Sql Server) to vc++.net programically.I also want to use insert delete update queries in the form .Please help me or please send any link for the problem.
Thanks.
www.codeproject.com/database[^]
the link contains only the connection strings
Please help.
Thanks
|
|
|
|
|
amaneet wrote: the link contains only the connection strings
Wrong. Between the articles on that link, and the articles in MSDN, you really shouldn't have any trouble.
But you're still posting in the wrong forum.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
If I write this...
Managed c++..
template<typename T>
public ref class SomeTemplate
{
public:
SomeTemplate();
void Test(void)
{
}
};
public ref class ManagedCppClassToUseFromCSharp
{
public:
SomeTemplate<System::Int32> aMember;
};
Then in c# client
ManagedCppClassToUseFromCSharp test = new ManagedCppClassToUseFromCSharp();
test does not contain a member called aMember
However if I do this...
template<typename T>
public ref class SomeTemplate
{
public:
SomeTemplate();
void Test(void)
{
}
};
public ref SomeTemplateInt : public SomeTemplate<System::Int32>
{
public:
SomeTemplateInt();
}
public ref class ManagedCppClassToUseFromCSharp
{
public:
SomeTemplateInt aMember;
};
Now I can access aMember from c#. Anyone know why and if there is a way to get around having to declare different classes derived from my template?
|
|
|
|