Click here to Skip to main content
15,912,897 members
Home / Discussions / C#
   

C#

 
Answercan you help me out Pin
mrkeivan25-Mar-06 0:34
mrkeivan25-Mar-06 0:34 
GeneralRe: can you help me out Pin
RizwanSharp25-Mar-06 3:09
RizwanSharp25-Mar-06 3:09 
GeneralRe: can you help me out Pin
cfsego7-May-06 21:05
cfsego7-May-06 21:05 
GeneralRe: can you help me out Pin
mrkeivan8-May-06 3:58
mrkeivan8-May-06 3:58 
QuestionCan We detect Sql Servers on Network using c# Pin
Jax_qqq24-Mar-06 19:37
Jax_qqq24-Mar-06 19:37 
QuestionHow to change textBox contents using ActiveX Pin
wajih2k24-Mar-06 19:04
wajih2k24-Mar-06 19:04 
QuestionDll's Pin
Navaneeth.K.N24-Mar-06 18:58
Navaneeth.K.N24-Mar-06 18:58 
AnswerRe: Dll's Pin
HakunaMatada24-Mar-06 21:56
HakunaMatada24-Mar-06 21:56 
I don't think there is any mechanism which prohibits other programs to use your class library.

As a thought, what can be done is have a sort of login functionality in your class library. I mean, before anyone can use any of the functions in your class library, they have to first login to your class library. Create a function known as login, which takes a username and a password. If the username and the password are correct, set an internal flag to true. Now when other functions are being called, check for the internal flag! If the internal flag is false, don't execute the function, if it is true then go ahead as it normally would.

bool blnValidUser = false ;<br />
<br />
bool LoginUser( string strUserName, string Password )<br />
{<br />
  if( username and password match )<br />
  {<br />
    blnValidUser = true ;<br />
    return true ;<br />
  }<br />
  else<br />
  {<br />
    blnValidUser = false ;<br />
    return false ;<br />
  }<br />
}<br />
<br />
void function1()<br />
{<br />
  if( blnValidUser is true )<br />
  {<br />
    Go ahead as planned.<br />
  }<br />
  else<br />
  {<br />
    return ;<br />
  }<br />
}


Hope this helps! Smile | :)

---
With best regards,
A Manchester United Fan

The Genius of a true fool is that he can mess up a foolproof plan!
QuestionUnique Registration Key Pin
Navaneeth.K.N24-Mar-06 18:56
Navaneeth.K.N24-Mar-06 18:56 
AnswerRe: Unique Registration Key Pin
HakunaMatada24-Mar-06 22:02
HakunaMatada24-Mar-06 22:02 
QuestionByte to bits conversion Pin
eggie524-Mar-06 18:55
eggie524-Mar-06 18:55 
AnswerRe: Byte to bits conversion Pin
Robert Rohde24-Mar-06 20:04
Robert Rohde24-Mar-06 20:04 
GeneralRe: Byte to bits conversion Pin
eggie524-Mar-06 20:08
eggie524-Mar-06 20:08 
GeneralRe: Byte to bits conversion Pin
Robert Rohde24-Mar-06 20:12
Robert Rohde24-Mar-06 20:12 
AnswerRe: Byte to bits conversion Pin
leppie24-Mar-06 21:46
leppie24-Mar-06 21:46 
QuestionAnyBody Hep Me !!!!!! Pin
AnhTin24-Mar-06 17:16
AnhTin24-Mar-06 17:16 
AnswerRe: AnyBody Hep Me !!!!!! Pin
Robert Rohde24-Mar-06 20:06
Robert Rohde24-Mar-06 20:06 
QuestionInput video to my background form Pin
youssef24-Mar-06 9:18
youssef24-Mar-06 9:18 
AnswerRe: Input video to my background form Pin
Ed.Poore24-Mar-06 11:07
Ed.Poore24-Mar-06 11:07 
QuestionExpanded Remote Registry Editing Issues Pin
Joshua Lunsford24-Mar-06 9:03
Joshua Lunsford24-Mar-06 9:03 
AnswerRe: Expanded Remote Registry Editing Issues Pin
Dave Kreskowiak24-Mar-06 9:35
mveDave Kreskowiak24-Mar-06 9:35 
GeneralRe: Expanded Remote Registry Editing Issues Pin
Joshua Lunsford24-Mar-06 9:54
Joshua Lunsford24-Mar-06 9:54 
GeneralRe: Expanded Remote Registry Editing Issues Pin
Dave Kreskowiak24-Mar-06 12:42
mveDave Kreskowiak24-Mar-06 12:42 
QuestionHow to off window in console application? Pin
Dima Filipiuk24-Mar-06 8:58
Dima Filipiuk24-Mar-06 8:58 
AnswerRe: How to off window in console application? Pin
Ed.Poore24-Mar-06 9:09
Ed.Poore24-Mar-06 9:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.