|
I am trying to write an application that allows user login by windows authentication (includes domain and username).
For example:
Username: MYDOMAIN\MyUser
Domain:MYDOMAIN
If this username is valid, application will check for user's role, if user's role is BUILTIN\Users then this user can do their works.
But it's so difficult, can you help me?
|
|
|
|
|
This[^] previous thread has a similar question, refer to it for possible answers.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Im trying to call a function in a class written in managed c++, from c#. The compiler interpret the types WCHAR*, BSTR and wchar_t* in managed c++ to a ushort* in c#.
This is the C# code calling the method _logonUserWithSSPI in the managed c++ code:
pExistingTokenHandle = oSSPIHelper._logonUserWithSSPI(NTLM", TOKEN_QUERY, "DOMAIN", "test", "smurf");
This is the managed c++ code (.h):
HANDLE _logonUserWithSSPI(WCHAR* pszSSP, DWORD grfDesiredAccessToToken, BSTR pszAuthority, wchar_t* szPrincipal, wchar_t* pszPassword);
How could I call this _logonUserWithSSPI method and pass the strings to it (convert a string to ushort*)?
|
|
|
|
|
I've a dll that hold a DataSet I need this DataSet to be Reference to a DataSet In My project....
as We do In C++ with pointers.......
plz help
|
|
|
|
|
hi,
Im developing a music centre project for college and i was just wondering could someone clear this up for me before i delve into it further.
Is it possible to rip straight from a CD to .mp3 or .ogg using C#? These are the only two format options i am allowed to use.
I have done a lot of searching and i am surprised that i couldnt find any decent information on it. I have found lots of shareware applications that do so i have to assume that it can be done, its just that no one wants to tell anyone how they didit!
At the minute im thinking off just ripping them as .wav's and then automatically converting them to .mp3 and then deleting the original .wav.
Yes this does sound crap and would take a lot of time in the application, AND i would get an awful grade for it but at the minute its all i can think off!
Any help appreciated!
J.
|
|
|
|
|
Find the specification for a music cd, and then a mp3. Then with your C# skills do the conversion from the cd audio to mp3 format.
/\ |_ E X E GG
|
|
|
|
|
|
hello worlde
can you helpe me for control comera white c#
tankyou
|
|
|
|
|
Based on this detailed information, no. What camera ? How do you want to 'control' it ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
hello worlde
can you helpe me to control camera whitt c#
tankyou
|
|
|
|
|
Please help me! How can I intergrate my project into .NET template (a wizard-like project). I have read some articles, but I was confused !
Can you please show me step by step!
Thank you very much!
|
|
|
|
|
I have a stupid question:
May I include a file of any type into my project for further using?
For example, I include a text file into my project (Readme.txt), then I can read this file internally from my project by my form
|
|
|
|
|
If you set it to be an embedded resource, it's included in your assembly.
You can then, for example, use
Assembly asm = Assembly.GetExecutingAssembly();
Stream str = asm.GetManifestResourceStream("MyNamespace.Readme.txt"); to get a Stream that you can read the embedded resource with.
One important fact is that you have to give the complete name of the embedded resource (including your assembly's namespace) or else it cannot be found and you'll receive null from GetManifestResourceStream() .
Regards,
mav
|
|
|
|
|
Hi
I don't know if it's possible to include any File to a project. But I dont't think so.
But if you want to read a text file you can use the StreamReader Class.
Example:
using System.IO;
string read ="";
StreamReader sr = new StreamReader("c:\\readme.txt");
sr.ReadLine();//or any method you need
read = sr.ReadLine().ToString();
sr.Close();
|
|
|
|
|
no, I mean this file is included in my project, not in hard ive
|
|
|
|
|
Hi...,
1:I want to fix printer and paper seeting in C#.
I want that when user click on Printpreview button than Paper size automatically fix on A4 and Margin left and right 0.3 and top and bottom margin 0.5.
Does any body now how to do this job.
2: In c#.net how i export sql database data in access database file as in Sql own feature.
|
|
|
|
|
Hello,
I load data from SQLServer Dynamically. Loading data is okay however i dont know
how i could change the Column Title for Each Column. Here is my Code with missing code
that could change the Column Title.
string server="server=FRITZ; integrated security=SSPI; initial catalog=IDDatabase";
string selectcmd="Select username,userdatecreated,usercreatedby FROM IDUSERS";
SqlConnection conn;
SqlDataAdapter da;
DataSet ds;
conn=new SqlConnection(server);
conn.Open();
da=new SqlDataAdapter(selectcmd,conn);
ds=new DataSet();
ds.Clear();
da.Fill(ds,"IDUSERS");
dataGrid1.DataSource=ds;
dataGrid1.DataMember="IDUSERS";
conn.Close();
Thanks
|
|
|
|
|
Hi,
You can change the column title using ColumnName property of DataColumn.
ds.Tables[0].Columns[0].ColumnName = "Employee Id";
ds.Tables[0].Columns[1].ColumnName = " Employee First Name";
Change the column names before associating the data set with the data grid.
Hope this will help you.
Regards
SGS
|
|
|
|
|
Hello,
You're code works as expected.
Thanks a lot.
Regards,
fjlv2005
|
|
|
|
|
Hai,
I want to place a button on my form to open command dialog box . i.e to open files..from dirves..they may me word docs anything.
say in c: i have few word docs.
i wnt to place a option to open them.
kindly give me the code for this.
chand
|
|
|
|
|
Hi
I think you need something like OpenFileDialog.
Try this:
OpenFileDialog openfile = new OpenFileDialog();
openfile.Show();
|
|
|
|
|
My application re-configures the network settings (IP, Subnet Mask, Gateway, DNS..) and after that I want to disable and then enable the Local area connection (not the network card), so the connection is refreshed with the new settings without having to restart the computer. Does anybody have any idea on how to do it in C#? Thanks for your time.
Radgar
"Imagination is more important than knowledge." - Albert Einstein
|
|
|
|
|
You don't have to disable/enable to network card to get the settings to refresh. You can make the changes using WMI, but watch the return codes. No matter what method you chose to make those changes, Windows will tell you if the machine has to be restarted for the changes to take effect. Otherwise, in most cases, the changes you make take effect immediately.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a field in a database that contains a value with double quotes ("Test Value"). I am trying to use this in a javascript by writing it back out. I need to be able to seach the string for double quotes and replace them with \" so that the end result is \"Test Value\". Is there a function in .NET to handle this? In Delphi, there is a QuotedStr() function.
|
|
|
|
|
No - but it's easy enough to write your own.
David Anton
Tangible Software Solutions
www.tangiblesoftwaresolutions.com
Home of the Instant C# VB.NET to C# Converter and the Instant VB C# to VB.NET Converter
|
|
|
|