|
Hi! i have a question about C# and Active Directory. I've been searching all over the place, and i have yet to find what i am looking for.
first, I need a list of the basic objectCategory categories. Mainly the NTID, Phone number, and e-mail address. If there is a method that exports a list of the categories in the selected schema, that would be even better.
second, I need to know how to set the AD properties for the logged on account, based on text input boxes.
Any help would be AMAZING! Also, if there are any really good books on programming for AD, i'd really like to know which one is worth the price.
|
|
|
|
|
|
// the original c++ has those struct:
typedef struct
{
long id;
} StructA;
typedef struct
{
long price
StructA[4] idArray
}StructB
typedef struct
{
long date;
StructB priceArray
}StructC
// a function use those struct
void foo(StructC* quote)
//=============================================
// c# correspoding type
//=============================================
[StructLayout(LayoutKind.Sequential)]
struct StructA;
{
int id;
}
[StructLayout(LayoutKind.Sequential)]
struct StructB
{
long price
[MarshalAs(UnmanagedType.ByValArray,SizeConst=4 )]
StructA[] idArray
}
[StructLayout(LayoutKind.Sequential)]
struct StructC
{
long date;
StructB priceArray
}
// c# function
void foo(ref StructC quote)
It always complain StructB doesnt have layout info...
stuck for whole day
, really need help.
|
|
|
|
|
Sorry, just saw some post ,
currently , struct array as a member of struct is not supported.
But use flat stuct , member like this: arr1, arr2.... sounds not a good idea, Who can give a good work around?
|
|
|
|
|
Just to give you an idea, try changing the line in structB
From: [MarshalAs(UnmanagedType.ByValArray,SizeConst=4 )]
To: [MarshalAs(UnmanagedType.ByValArray, ArraySubType=UnmanagedType.LPStruct, SizeConst=4 )]
Basically you may need to specify the type of data that you have in the array. In this case I used LPStruct but you can try other types. I don't understand why we wouldn't be able to pass other structures after all, it's just a bunch of bytes that have to be marshaled into your managed structures.
|
|
|
|
|
|
I need to be able to get and parse a specific line from a richTextBox. I know you can get all the text from the box, or substrings if you know the start and end index, but I can not find a way to get just one line by using the line index. Does anyone know how to do this? I would appreciate any input you have. Thanks!
|
|
|
|
|
|
I am looking to find out how to add text from a file to a database. I am using the Split() method, and adding the text to a string array. How would I go about adding this text into a DB....into different columns?
|
|
|
|
|
May this help ? :
for(int i=0;i<myArray.Length;i++)<br />
{<br />
DataRow r = mydataSet.Tables[0].NewRow();<br />
r[Your index] = myArray[i];<br />
meDataSet.Tables[0].Rows.Add(r);<br />
}
.
|
|
|
|
|
Thanks for the reply! I am not sure what you are referencing on this line:
r[Your index]?
|
|
|
|
|
The index of the column you are tring to put this value in ,or just it's name just like :
r[3]
r["SplittedString"] .
|
|
|
|
|
I see exactly what you are saying. Let me give you some more detail though. I have created an app that will inventory computer information. It will write this info to a data file using a ; as a delimiter. This is where I get my SplitString. In this text file, one line will represent one computer, so I want to try and add the infomation of that one line into a DB row with Columns that have already been specified.
I am very close to figuring this out, but any help would be appreciated!
|
|
|
|
|
I just came from VB.NET to C# and in VB when ur in the programing window and you click the members box it displays all the events of a form or listbox ect.... it does not do this in C# though is there a way I can fix this?
thanks
|
|
|
|
|
|
Hi,
I've found the decimal code for the languages for a set of exe packages. All i need now is to from this code, i need to get the particular language. How am i to do this in C#?
|
|
|
|
|
|
yeah decimal code for eg if i supply 1033 means it should return English-UnitedStates similarly if i give any code sort of like that, it should return the language. how to do this ?
an elaborate way i did is by switch case. but i want a crisp way of doing this.
forget abt the exe packages.
|
|
|
|
|
A Hashtable (or Dictionary<int, string=""> if you're using 2.0 beta) is the way to go; put all the possible number codes in the dictionary as keys, with their corresponding language strings as values.
hashtable.Add(1033, "English-US");
That way, when you go to retrieve a language name based off the code for that language, you can use:
string languageName = (string)hashtable[1033];
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: The Secular Left, the Religious Right, and Prejudice
Judah Himango
|
|
|
|
|
Guys.
I am a Java dev who is needing to jump into c# space for a while and I was wondering if someone could point me in the correct direction.
I am needing to write a small Pocket PC application which plays one track of music but will occasionally overlay another track ontop of it.
Can anyone out there point me to an example as I have not been able to find one.
Thanks for the help
Ant
|
|
|
|
|
First, what are your requirements? .wav files, mp3 files, wma files? You'll need some library that can play these. The current .NET framework library does not contain audio playing classes (although the .NET 2.0 beta does).
Once you know what kind of files you want to play, you'll need libraries that run on a PocketPC that can play those files.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: The Secular Left, the Religious Right, and Prejudice
Judah Himango
|
|
|
|
|
I'm developing a program to monitor labor efficiency within my company on different products that we build. The user is able to select the product in a drop down list and then I want them to be able to print the data to a chart (labor efficiency over time). I'm storing my data on a SQL database and have created individual tables for each product. I want to setup a single chart in Crystal Reports that I can take my efficiency column and date column from the product table selected by the user and display that data. I've attempted to create this chart (my first CR experience and my first C# project) through the reports wizard, but I had to select one specific table to pull the data from instead of having the choice of selecting all the tables, and I'm not sure how, or if, I can get around this. Am I going about this the easiest and most efficient way? And does CR have the ability to do this or do I have to build the chart dynamically to get the results I'm looking for? Thanks.
|
|
|
|
|
Hi,
Excuse me for my english please.
1.My class has a readOnly property wich could be initialized by the constructor. I have MyClassConverter to customize property of this type at design-time. Evrything works ok.
But when my class becomes a component all of it properties are not accessible at design-time they are readOnly.
2.My class has a delegate type property and I need to customize it at design time too. It is possible to do it using event. But I think that there sre some methods to init it directly as delegste.
I found a lot of articles here about runTime component readOnly properties customization but didn't find anything about design time.
|
|
|
|
|
Hi!
i have c sourcecode like this
int r = 125;
if (!r) {
...
}
in c# r is a integer and not a boolean value. would it be correct to replace
if (!r) {
}
by
if (r<1) {
...
}
|
|
|
|
|