|
LouMattera wrote: The first parameter I need to pass is a pointer to a structure which contains pointers to another structure. I tried everythiing I could find on the internet and nothing has solve this issue.
Did you try creating a managed class that wraps the function using C++/CLI so you can use the native structures?
led mike
|
|
|
|
|
No I have not. What I understand is you want me to write a managed dll in c++ to bridge to the unmanaged c dll.
|
|
|
|
|
LouMattera wrote: you want me to write a managed dll in c++ to bridge to the unmanaged c dll.
I don't want you to do anything, I was just asking a question. Since I have used C++ for many years I find using PInvoke from C# rather than using C++ to interop with C like trying to put a square peg in a round hole.
led mike
|
|
|
|
|
I agree, I am going a little crazy trying to make this work in c#. If I write a c++ wrapper would I define the structure as a class ? I beleive you can pass a class as a pointer to a managed c++ dll. Then the c++ dll would call the unmanged function in the legacy dll.
|
|
|
|
|
I have a datatable which is having n no. of rows and each row has a unique field say ID.
Now I want to get a particular row for a specified ID.
eg. there are 5 rows in a datatable and the id's are
1,2,3,4 and 5 and if I want to select a row having ID = 4
What will be the code snippet for that?
Does anybody have any idea?
Thanks in advance,
|
|
|
|
|
|
DataRow row = dataTable.Select( "ID = 5" );
|
|
|
|
|
Actually what I m trying to do is I m firing a query in SQL Server 2005 to retrieve records for selected criteria.
Based on the selection the query result I m taking that in a datatable and I have a GridView where this list of results is displayed.
Now there is a hyperlink in the Grid to select the detailed information about a particular result.
eg. In the query result I get 5 records matching the selection criteria, which are stored in a datatable.
now these reults are displayed in the grid and when i click on the hyperlink of a particular row then the records of that row should get selected and the detailed info should get displayed in another page.
For this particular row selection I want a row from the datatable.
|
|
|
|
|
Hello everyone,
I want to convert an object instance to XML string, and later read the XML string to construct the object again. Any samples?
(I find some serialization samples, but all about binary format, I prefer to use XML format.)
thanks in advance,
George
|
|
|
|
|
XmlSerializer[^]
Basically the same as binary serialization but to/from xml as requested.
|
|
|
|
|
Cool, J4amieC!
This is what I am looking for.
regards,
George
|
|
|
|
|
We have an application that polls active directory for a list of e-mail accounts. Until recently, all accounts were housed in Exchange. Recently, a merger with another company has introducted Lotus Notes into the mix.
Can anyone assist me in determining whether an e-mail account is defined in Exchange or defined in Lotus Notes programmatically?
From my perspective, all data is being retrieved via the Exchange server, but, all users, regardless of system of origin, show up in the global address list. As well, users have the same OU values.
Thanks in advance for any help provided.
Tim
P.S. - And, yes, I have searched forums, arcticles, MSDN, and Google.
modified on Wednesday, May 7, 2008 9:36 AM
|
|
|
|
|
Does both Exchange and Lotus Notes using Same AD ?
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
Hi,
I want to generate some automated code when I implement an interface in a class.
For example if I have an interface i.e.
using System;
using System.Collections.Generic;
using System.Text;
namespace Foo
{
public interface IFoo
{
bool DoSomething();
}
}
Now what I want to do is when I implement the interface in a class normally it defines the method in the class. I want to extend this so that I can have some automated code in the defined method as well. Please help me and guide me how to do this.
Regards;
Uttam Kumar
|
|
|
|
|
You cannot do what you are thinking of. There are other options...
1. You could change the class from a type interface to a type class and make the function a public virutal method so that any base classes can have the option of overriding that function.
2. You could create code snippets so that when you type something code (like: dosomething) then the code you want is automatically placed into the file for you.
Chris
|
|
|
|
|
Thanks for quick reply. Is it not even possible to write some commented code or some sort of comment?
Regards;
Uttam Kumar
|
|
|
|
|
Either way (using an base class with a public virtual function or a code snippet) you can have a comments.
Chris
|
|
|
|
|
Thanks again. code snippet is OK but in that case I need to tell user to call snippet but I'm not sure that by implementing virtual function I would be able to generate automated code or code template if possbile can you please send me a quick example.
Regards;
Uttam Kumar
|
|
|
|
|
I think instead of Interface you better go for Abstract class. This will serve your wish.
Anindya Chatterjee
|
|
|
|
|
If all you want is to run some code before allowing the derived class's method to run, you can use the Template Method pattern. It looks like
abstract class BaseFoo
{
public bool DoSomething()
{
BaseFooDoSomething();
DoSomethingInternal();
}
protected abstract void DoSomethingInternal();
}
Clients can only override DoSomethingInternal and you'll always get to run BaseFooDoSomething before executing the derived class code.
Does this help?
|
|
|
|
|
Sorry but that's not my question. What is want is a method when you implement a method some how a wizard would give you a templete code. I also don't want to use snippet as it would be additional step for the consumer.
Regards;
Uttam Kumar
|
|
|
|
|
Uttam Kumar Unik! wrote: What is want is a method when you implement a method some how a wizard would give you a templete code.
So you don't care if the developer deletes the autogenerated code?
|
|
|
|
|
That's correct. Let me explain what I want to do. I'm writing a pluin to do some sort of auditing. Now who ever consume the plugin would be setting different types of value as per need. Now I want to give them an automated sample code so that without going through the document he would know how to setup the configuration etc. Just wanted to make my plugin smart enough so that I would go even 80% - 90% client coding it's own. Ofcourse one way is code Snippet but the problem with code snippet is user can easily forget to call the snippet and it's an addition step for the user as well. So I want to physically do some coding for the user through the plugin.
Regards;
Uttam Kumar
|
|
|
|
|
|
The C# forums are not a place advertising, no matter how good you think it is.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|