|
ok...thanks bro...gud luck
|
|
|
|
|
or mayb u hav ani c prgming codes for us to reference on encrpy and decryp?
|
|
|
|
|
Here[^] is a C++ library which will use the .net Rijndael class to encrypt or decrypt a file.
If I remember correctly, You just have to pass one call with the file to encrypt and the destination path, and It will complete all of the encryption for you.
|
|
|
|
|
ok ... 10s bro... i beleive you help alot...
|
|
|
|
|
vbvic wrote: or mayb u hav ani c prgming codes for us to reference on encrpy and decryp?
What the hell is that supposed to mean
vbvic wrote: mayb
Are you really that lazy you cannot type an extra character.
vbvic wrote: u
Switching to Dutch mid-sentence is quite confusing.
vbvic wrote: hav
Or maybe you do not have an E key. Geez
vbvic wrote: prgming
programming?
vbvic wrote: encrpy
-ption. Seriously, are you so lazy you cannot finish off words.
vbvic wrote: decryp
-ption. Again. How lazy can one person be!?
|
|
|
|
|
yup that's right, how can?
|
|
|
|
|
iam not reali familiar wif vb platform... i tried these codes
im usin vb6
=============================================================
Private Declare Function EncryptFile Lib "ADVAPI32" Alias _
"EncryptFileA" (ByVal lpFileName As String) As Boolean
Private Declare Function DecryptFile Lib "ADVAPI32" Alias _
"DecryptFileA" (ByVal lpFileName As String, ByVal dwReserved As Long) As Boolean
Public Function Encrypt(ByVal strFileName As String) As Boolean
Encrypt = (EncryptFile(strFileName) = True)
End Function
Public Function Decrypt(ByVal strFileName As String)
Decrypt = (DecryptFile(strFileName, 0) = True)
End Function
Private Sub Command1_Click()
If Encrypt("c:\temp\MyFile.txt") Then
MsgBox "It Worked"
Else
MsgBox "It Failed"
End If
End Sub
===============================================================
it wont work...
|
|
|
|
|
Sorry, being a C/C++ programmer, I can't read your code very well.
It looks like you don't have a condition that will show "it worked";
vbvic wrote: Private Sub Command1_Click()
If Encrypt("c:\temp\MyFile.txt") Then
MsgBox "It Worked"
Else
MsgBox "It Failed"
End If
End Sub
Have you adding " = 1" after "Encrypt(<filepath>) Then"
ex: "Encrypt(<filepath>) = 1 Then"
I hope that works for you.
-- modified at 12:24 Wednesday 12th July, 2006
p.s. If you are calling the encrypt function in .net, you will not be able to encrypt the file, because the .net encrypt function encrypts only already sized blocks of data. You will only end up encrypting the string you pass to the encrypt function. You have to put the data into block sizes first.
|
|
|
|
|
Hey Bob
How do I put the data into block sizes?
Thanks
|
|
|
|
|
There is another member of the .net Rijndael class that will put the data into appropriate block sizes, Although I don't recall which member you need offhand.
|
|
|
|
|
Hey there vbvic. I've had to do a similar project myself. I was tasked to create a simple program that could lock or unlock a file just by the click of two respective buttons. Being a VB noob, I thought that encrypting would be the right way to go.
Anyone could enlighten me with some sample codes to get started?
Thanks in advance.
|
|
|
|
|
hellow to all ..
i am trying to work with Microsoft Outlook 11.0 Objects Library but i can't find it in my COM Obects list ..
what can i do ?
can i down load it from anywhere ?
thxx
-- modified at 11:27 Wednesday 12th July, 2006
|
|
|
|
|
Outlook Express doesn't expose a COM OBject model. Only the Office version of Outlook does. If you can't find this library under the COM tab, in References, then you don't have Office's Outlook installed or you haven't installed the .NET Framework programming support option when you installed Office.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
aha i understand thank u
what i wanna do is a simple thing when i click on a text that have an email address to pop a outlook express new mail message window and to have in it the email address that i had click at , just like the simple html , thxx
|
|
|
|
|
You can launch the default mail client simply by starting a new Process and giving it a command line of "mailto:emailaddress@somewhere.com".
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
and where i can find how to do this ?
thxx
|
|
|
|
|
i had started a new process but when i pass to it the mailto command it dosen't work , i don't get the new mail message window
objProcess = New System.Diagnostics.Process
objProcess.Start("C:\Program Files\Outlook Express\msimn.exe", "mailto:microuser@gmail.com")
|
|
|
|
|
No, no, no... You don't pass in an .EXE. You just give it the "mailto:" line!
objProcess = New Process
objProcess.Start("mailto:microuser@gmail.com")
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I am trying to download files in VB 2005 Asynchronously (To avoid UI JAM) , I need to post the filename to the server and the file is being supplied as server response. Pls. guide. This is what I am currrently using but its OK for Text, Html files.
Public Sub PostData(ByVal strURL As String, Optional ByVal POST1 As String = "")
' Declare a variable named client of type WebClient.
Dim myWebClient As WebClient
' Instantiate a WebClient object and assign it to the 'client' variable.
myWebClient = New WebClient
' Add handler to process theWebClient's DownloadProgressChanged events.
AddHandler myWebClient.UploadProgressChanged, AddressOf UploadProgress
' Add handler to process theWebClient's DownloadCompleted event.
AddHandler myWebClient.UploadStringCompleted, AddressOf UploadCompleted
' Declare a variable named downloadUri of type Uri
Dim downloadUri As Uri
' Instantiate a new Uri object and assign it to the 'downloadUri' variable.
downloadUri = New Uri(strURL)
myWebClient.Headers.Add("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4")
'myWebClient.Headers.Add("Accept-Language", "en-us,en;q=0.5")
Try
myWebClient.UploadStringAsync(downloadUri, "filename=" &POST1)
End If
Catch e As System.Net.WebException
MsgBox("A web exception has occured [" & strURL & "]." & vbCrLf & " System returned: " & e.Message, MsgBoxStyle.Exclamation, "Error!")
Exit Try
Catch e As System.Net.ProtocolViolationException
MsgBox("A protocol violation has occured [" & strURL & "]." & vbCrLf & " System returned: " & e.Message, MsgBoxStyle.Exclamation, "Error!")
Exit Try
Catch e As System.Net.Sockets.SocketException
MsgBox("Socket error [" & strURL & "]." & vbCrLf & " System returned: " & e.Message, MsgBoxStyle.Exclamation, "Error!")
Exit Try
Catch e As System.IO.EndOfStreamException
MsgBox("An IO stream exception has occured. System returned: " & e.Message, MsgBoxStyle.Exclamation, "Error!")
Exit Try
End Try
End Sub
|
|
|
|
|
What? Nobody, Is that impossible???
|
|
|
|
|
It seems to be a tough one! but Hey! pro's pls. get a workaround.
|
|
|
|
|
In the simplest design, you'd wrap a WebClient in a class that does nothing but submit a request, then wait for the response. Create a new instance of this class on a seperate thread, giving it the URL of the file you want to download. Any events for tracking progress would have to be marshalled back to the UI thread.
Do I have any example code? Nope. I suggest searching the articles and Googling around for it.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello Everybody,
I created sp for insert in sql server 2000.I need to call the procedure using vb.net 2003.I tried using parameters to supply input to sp but, i got error as "Procedure 'asd' expects parameter '@ID', which is not supplied"
I dont know proper way to do it .
can anybody Guide me
Thanks in Advance.
|
|
|
|
|
put your code here...
you must use command parameters...
|
|
|
|
|
For example, i have a db with name abc.mdb in this db i have a table tha calls "aaa" in this table i have the information "a" "b" "c" "d". Is it possible to save the information of the lines "a" and "b" in a TXT at the same time? Could some one give me an example?
cumps
|
|
|
|