|
|
PInvoke.net will list the functions for Windows API's. For third-party libraries, you'll have to contact the manufacturer of the library you're trying to use.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Kindly I want to know how I can use c# to do the following tasks in LAN:
- send and receive files to another PC(s) in my workgroup
- place an a signature or E-signature to the file which i sent belong to the user
- I want this file to come back to me with the user comment and signatue to be sure that he received it and read it with the comments
- when the user wants to open the sent file he has to put a password to open that file and read it so after putting that password his signature will automatically placed in the document
- the attachments such as Word documents or exel.
thanks for interst
with best regards
imad
|
|
|
|
|
Why not just use email?
|
|
|
|
|
Public Function Get_Reg(ByVal RegPath As String, ByVal RegKey As String, ByVal target As String) As Object
Dim Reg As Microsoft.Win32.RegistryKey
Dim RegMain As Microsoft.Win32.RegistryKey
Try
Reg = Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, target)
RegMain = Reg.OpenSubKey("SOFTWARE\" & RegPath)
Return RegMain.GetValue(RegKey, "")
Catch ex As Exception
Return Nothing
Exit Function
End Try
Reg.Close()
Reg = Nothing
End Function
Please convert this to c# code....
Im am SUPER P
|
|
|
|
|
public object Get_Reg(string RegPath, string RegKey, string target) {
Microsoft.Win32.RegistryKey Reg;
Microsoft.Win32.RegistryKey RegMain;
try {
Reg = Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, target);
RegMain = Reg.OpenSubKey("SOFTWARE\\" + RegPath);
return RegMain.GetValue(RegKey, "");
}
catch(Exception ex) {
return null;
}
// FOLLOWING CODE WILL NEVER BE EXECUTED!!!
Reg.Close();
Reg = null;
}
___________________________________
Tozzi is right: Gaia is getting rid of us.
My Blog [ITA]
|
|
|
|
|
using Microsoft.Win32;
...
public object Get_Reg(string regPath, string regKey, string target)
{
RegistryKey reg = null;
RegistryKey regMain = null;
try
{
reg = RegistryKey.OpenRemoteBaseKey(RegistryHive.LocalMachine, target);
regMain = reg.OpenSubKey("SOFTWARE\\" + RegPath);
return regMain.GetValue(regKey, string.Empty);
}
catch(Exception ex)
{
return null;
}
finally
{
if(reg != null)
{
reg.Close();
}
}
}
|
|
|
|
|
how about this one.. this one might be difficult....
Private Function Decrypt_Key(ByVal bProductKey() As Byte) As String
Dim ilByte As Long
Dim ilKeyByte As Long
Dim nCur As Integer
Dim RetKey As New System.Text.StringBuilder
Dim bKeyChars() As Char = {"B", "C", "D", "F", "G", "H", "J", "K", "M", "P", "Q", "R", "T", "V", "W", "X", "Y", "2", "3", "4", "6", "7", "8", "9"}
For ilByte = 24 To 0 Step -1
nCur = 0
For ilKeyByte = 14 To 0 Step -1
nCur = nCur * 256 Xor bProductKey(ilKeyByte)
bProductKey(ilKeyByte) = Int(nCur / 24)
nCur = nCur Mod 24
Next ilKeyByte
RetKey.Insert(0, bKeyChars(nCur))
If ilByte Mod 5 = 0 AndAlso ilByte <> 0 Then RetKey.Insert(0, "-")
Next ilByte
Return RetKey.ToString
End Function
Im am SUPER P
|
|
|
|
|
Let me show you my secret weapon: Lutz Reflector[^]. Point it to a dll or exe built in Visual Basic.NET, and it can show you the corresponding code in C#. It's a great tool and will help you with your conversion process.
|
|
|
|
|
Judah Himango wrote: Let me show you my secret weapon: Lutz Reflector[^]. Point it to a dll or exe built in Visual Basic.NET, and it can show you the corresponding code in C#. It's a great tool and will help you with your conversion process.
It says C to VB... does it have a reverse convertion?
Im am SUPER P
|
|
|
|
|
If it says "C to VB" it has to be a typo. Reflector shows compiled code as IL, C#, VB , Delphi, MC++ or Chrome. There is no conversion from one language to another, and there is no C code.
---
b { font-weight: normal; }
-- modified at 12:31 Friday 24th February, 2006
|
|
|
|
|
i think you have sent the wrong converter.. its really a c# to vb converter...
do you have a yahoo messenger?
Im am SUPER P
|
|
|
|
|
It isn't a converter; it is a decompiler that can decompile any .NET code into C#, VB.NET, IL, and a few others. Just load up your dll that you want converted to C#, then view the disassembled code in C#.
|
|
|
|
|
public object Get_Reg(string RegPath, string RegKey, string target) {
Microsoft.Win32.RegistryKey Reg;
Microsoft.Win32.RegistryKey RegMain;
try {
Reg = Microsoft.Win32.RegistryKey.OpenRemoteBaseKey(Microsoft.Win32.RegistryHive.LocalMachine, target);
RegMain = Reg.OpenSubKey(("SOFTWARE\\" + RegPath));
return RegMain.GetValue(RegKey, "");
}
catch (Exception ex) {
return null;
// TODO: Exit Function: Warning!!! Need to return the value
return;
}
Reg.Close();
Reg = null;
}
|
|
|
|
|
|
Hi
I have two store procedur for update data in two table.For example t1,t2.
t1 is realeted with t2 and t1 have id_n(pk),name columns,t2 have id_n(fk),tel(ok).But the problem is if i add data to t1 and bye some reason(exception) i don't add to t2.I will not have related name with number how to solv this problem?
1.If i make one store procedure from this two.
2.If exist pleas tell me.))
good bye
|
|
|
|
|
|
Thank u for hepl
best regards
|
|
|
|
|
Iam trying to overload all operators using linked lists . I need some help regarding how to
go with it and what could tbe code be like.
Will really appreciate help in this regard . Looking forward to a positive response .
|
|
|
|
|
Overload all operators using linked lists? Operators on what class?
For your info, the LinkedList class[^] is built into .NET 2.0
|
|
|
|
|
I really appreciate the help but iam trying to use C++ way of linked list creation in C#
without using C# linked list class . Its my assignment. I really need help regardng that .
Like
in C++ Ptr->node
here iam using Node.Prev.Next; ecetera i really need help in this . Will appreciate any input.
|
|
|
|
|
Instead of the C++ pointer to the next node, just declare a node reference to the next node in C#:
class LinkedListNode
{
LinkedListNode next;
...
}
|
|
|
|
|
Hi,
Is there any who know how i can check it a user have pit an parameter behind the application name?
ie. myapp.exe parameter
I want to load a text file into a text field, and would like to know if it was possible to find out if the file could be loaded with a parameter like myapp.exe "C:\mytext.text" if im not not wrong this is also the way file extentions are loaded when you register an extention to your application.
Marker
|
|
|
|
|
Use the property Environment.CommandLine to see the full commandline (including the program itself).
Or use the method Environment.GetCommandLineArgs()
string cmd = Environment.CommandLine;<br />
string[] cmds = Environment.GetCommandLineArgs();<br />
You can check for if (cmds.Length == 2)
cmds[0] will be the path of your app, and cmds[1] (if it exists) will be the first parameter after it
|
|
|
|
|
great thanks! This was just what i needed.
Cheers.
|
|
|
|