|
also make sure that after u have compiled ur project u rightclick on ur setup project and select rebuild option.
if problem still exist try to remove the setup project from the projectlist and then add a new setup project.
Hope it will work.
Computer... Programming... What That
|
|
|
|
|
how to find the key ascii values of the buttons preseed in vb.net? THANKS
THANKS
|
|
|
|
|
use keypress or keydown event
if u want to get the code at form level don't forget to set the keypreview property of the form to true.
Computer... Programming... What That
|
|
|
|
|
I was wondering if there is a way to show animated Gifs in the program. If so what controll should i use to hold the Gif? Any help would be greatly accepted.
Thanks in Advanced
|
|
|
|
|
Im in the same problem, please help!
|
|
|
|
|
Hi.
I'm trying to play an .AVI file from a .dll, but the mmioInstallIOProcA fails.
It returns NULL (eg. error)
The code is:
In module:
<br />
Declare Function mmioInstallIOProcA Lib "winmm" _<br />
(ByVal fccIOProc_4 As String, ByVal pIOProc As Integer, ByVal dwFlags As Integer) As Integer<br />
<br />
Public Function AsAny(ByVal obj As Object) As IntPtr<br />
Dim MyGC As GCHandle = GCHandle.Alloc(obj, GCHandleType.Pinned)<br />
'get address of variable in pointer variable<br />
AsAny = MyGC.AddrOfPinnedObject()<br />
End Function<br />
<br />
Public Const MMIO_INSTALLPROC = &H10000 'mmioInstallIOProc: install MMIOProc <br />
Public Const MMIO_GLOBALPROC = &H10000000 'mmioInstallIOProc: install globally <br />
Public Const MEY = &H2059454D 'This is the value of "MEY " run through FOURCC <br />
<br />
<br />
In form:
<br />
<br />
Public Delegate Function IOProc(ByRef lpMMIOInfo As MMIOINFO, ByVal uMessage As Integer, ByVal lParam1 As Integer, ByVal lParam2 As Integer) As Integer<br />
<br />
Public Structure MMIOINFO<br />
Public dwFlags As Integer<br />
Public fccIOProc As Integer<br />
Public pIOProc As Integer<br />
Public wErrorRet As Integer<br />
Public htask As Integer<br />
Public cchBuffer As Integer<br />
Public pchBuffer As String<br />
Public pchNext As String<br />
Public pchEndRead As String<br />
Public pchEndWrite As String<br />
Public lBufOffset As Integer<br />
Public lDiskOffset As Integer<br />
Public adwInfo0 As Integer<br />
Public adwInfo1 As Integer<br />
Public adwInfo2 As Integer<br />
Public adwInfo3 As Integer<br />
Public adwInfo4 As Integer<br />
Public dwReserved1 As Integer<br />
Public dwReserved2 As Integer<br />
Public hmmio As Integer<br />
End Structure<br />
<br />
In function:
<br />
hInst = LoadLibrary("C:\test.dll")<br />
hRsrc = FindResource(hInst, "#101", "AVI")<br />
hGlobal = LoadResource(hInst, hRsrc)<br />
lpData = LockResource(hGlobal)<br />
fileSize = SizeofResource(hInst, hRsrc)<br />
<br />
Dim IODlgPro As IOProc<br />
IODlgPro = AddressOf myIOProc<br />
<br />
Dim res As Integer<br />
res = mmioInstallIOProcA(MEY, AsAny(IODlgPro).ToInt32, MMIO_INSTALLPROC + MMIO_GLOBALPROC)<br />
Error comes here.... returns 0
<br />
'Play the AVI file <br />
res = mciSendString("open AVI.MEY+ type avivideo alias AVI parent " & ParentHandle & " style child", 0&, 0&, 0&)<br />
DisplayError(res)<br />
<br />
res = mciSendString("play AVI", 0&, 0&, 0&)<br />
And ideers???
|
|
|
|
|
Never mind..... made it work.
But thanks anyway.
|
|
|
|
|
th error is when i run the project i get "An unhandled exception of type 'System.NullReferenceException' occurred in winpcap Wrapper test.exe
Additional information: Object reference not set to an instance of an object.
-----------------------------------------------------------------------------
Option Strict Off
Public Class Form1
Inherits System.Windows.Forms.Form
Private Declare Function getAdapterNames Lib _
"rvpacket.dll" (ByVal s As String) As Short
Private Declare Function openAdapter Lib _
"rvpacket.dll" (ByVal Adapter As String) As Short
Private Declare Function checkPacketQueue Lib _
"rvpacket.dll" (ByVal Adapter As String) As Short
Private Declare Function GetQueuedPacket Lib _
"rvpacket.dll" (ByVal s As String) As Short
Private Declare Sub closeAdapter Lib _
"rvpacket.dll" (ByVal Adapter As String)
Private Const SIMULTANEOUS_READS As Short = 10
Private Const MAX_ADAPTER_LEN As Short = 512
Private Const ADAPTER_DELIMITER As String = "|"
Private Const MAX_PACKET_SIZE As Short = 10000
Private Const ERR_SUCCESS As Short = 1
Private Const ERR_ADAPTER_ID As Short = 2
Private Const ERR_INVALID_HANDLE As Short = 3
Private Const ERR_INVALID_ADAPTER As Short = 4
Private Const ERR_ALLOCATE_PACKET As Short = 5
Public adapter As String
Private Sub btnstart_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnstart.Click
Dim qid As Short
Dim packetbuffer As String
Dim adapters() As String
Dim opensuccess As Short
Dim PacketQueue As Short
Dim packetlen As Short
Dim rawadapterdetails As String
Dim posdefaultadapter As Short
rawadapterdetails = Space(MAX_ADAPTER_LEN)
getAdapterNames(rawadapterdetails)
posdefaultadapter = _
rawadapterdetails.IndexOf(adapter_delimiter)
adapter = rawadapterdetails.Substring(0, posdefaultadapter)
opensuccess = openAdapter(adapter)
If opensuccess <> err_success Then
MsgBox("Unable to start. Check wincap is installed")
Exit Sub
End If
Do
PacketQueue = checkPacketQueue(adapter)
For qid = 1 To PacketQueue
packetbuffer = Space(max_packet_size)
packetlen = GetQueuedPacket(packetbuffer)
packetbuffer = packetbuffer.Substring(0, packetlen)
tbpackets.Text = tbpackets.Text & Replace _
(packetbuffer, Chr(0), " ")
tbpackets.SelectionStart = Len(tbpackets.Text)
System.Windows.Forms.Application.DoEvents()
Next
System.Windows.Forms.Application.DoEvents()
Loop
End Sub
Private Sub btnstop_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnstop.Click
closeAdapter(adapter)
End Sub
End Class
|
|
|
|
|
Without further information, like what library your using and a link to it, and what line the error occured on, it's difficult to tell what the problem is.
But, looking at you Declares, my first guess would be that your not passing parameters to all these functions correctly. Without the documentation on the library, it's impossible to tell.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
First thing is to go to
http://network.programming-in.net/downloads/rvpacket.zip
and download the file. file name is "rvpacket"
and then go to
http://winpcap.mirror .ethereal.co
and download "winpcap"
-----------------------------------------------------------------------------
the error is at line PacketQueue = checkPacketQueue(adapter)
im textbook programming this one and i don't have a Clue what I mean to say is in the book it told me to go to those two sites and download the DLLS that I would need to build and run this application I don't know what I have done wrong if you can please take a look and help if you can thank you
|
|
|
|
|
I have a string data field that I want to convert to Int32 that can contain negative numbers. When I run my code I keep getting an error.
What can I do to get this conversion to work?
Thanks, Anthony
|
|
|
|
|
Would you mind terribly showing us your code so we can see what you're doing. Without it, it's impossible to tell you what to do to get "it" to work.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Nevermind. I realized that my error was not the negative number, but rather that my value was a decimal and not an Int32.
Thanks
|
|
|
|
|
i want to build a project that
automatically encrypt/decrypt the incomming/outgoing packets in a LAN. It
would be by some hooking thing, build a network card driver or add an
additional layer on network layer. So can you please help me in building this
project by giving tips? you can help me in either ways:
if i want to build a hooking thing type which listen on all TCP and UDP ports
for data , automatically encrypt/decrypt the incomming/outgoing packets, how
can i do that?
OR
if i want to build network card driver, which automatically encrypt/decrypt
the incomming/outgoing packets in a LAN how can i do that? i have no idea
about writing a device driver.
OR
how can i write an additional later like a layer of NDIS protocol which
automatically encypt/decrypt the incomming/outgoing packets in LAN?
you can tell me the link to the source codes, examples, ebooks, books,
articles or tell me in your own way.
i will be very thankful to you as i am feeling so busted to write such type
of application in just in a week.
i am looking forward to you.
|
|
|
|
|
You're not going to do this in VB or VB.NET. Period. This is going to be a device driver project.
This is a project soley in the realm of C++ and the Winodws Device Driver Development kit. If you've never written a device driver, shelve this project now and learn. You're getting into a dark and not very well documented area of Windows development and you've got ALOT to learn before you tackle a project like this.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
We've found that if you have logic checking the existence of a file and you don't have access to the folder, the logic simply comes back as not exists.
For example if there is definitely a file called test.txt on the H:\ drive root directory and we don't have access to that drive the following logic simply executes the else part of the logic.
if file.exists("H:\test.txt") then
msgbox("It exists")
else
msgbox("It does not exist")
end if
How can we check if we first have access to a specific directory or drive?
Any help is appreciated.
Lost in the vast sea of .NET
|
|
|
|
|
You just did. Since you can't see the object, you can't get your access rights on it either. If you try to get your rights to the object, Windows will come back with something like "We can neither confirm nor deny the presence of H:\, let alone your rights to it."
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
We found that the following code worked well.
Try
………
Directory.GetFiles("c:\test")
………
Catch ex As UnauthorizedAccessException
Msgbox(“Sorry you’re not able to access the file….. yada yada yada”)
End Try
Thanks for your assistance!
Lost in the vast sea of .NET
|
|
|
|
|
You might want to try asking a question we can answer. None here will "guide" you in creating an entire application, since that is way beyond the focus of these forums and beyond the capability of a forum for that matter.
If you have specific questions about problems your having, great! We can do our best to try and answer them. But a generic statement like "I wanna write an app." is not going to help you at all.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a standalone application written in VB.NET that uses an access DB. The application is portable and used by several users on differnet machines. I want to be able to sync the portable DB's with a master DB. Is Replication the only way? The DB's are password protected at present. I can think of a way using replication with JRO, but that seems a bit old hat now. Please help
|
|
|
|
|
I have a standalone application written in VB.NET that uses an access DB. The application is portable and used by several users on differnet machines. I want to be able to sync the portable DB's with a master DB. Is Replication the only way? The DB's are password protected at present. I can think of a way using replication with JRO, but that seems a bit old hat now. Please help
|
|
|
|
|
Yes, replication is about the only way your going to accomplish this. You can either use the Replication facilities built into Access or use a 3rd party utility to do it, or come up with your own scheme and code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is anyone else having problems with logon boxes when trying to show a Crystal report?
We have an application which stores data internally as a set of collections. When we need to print the data on a report, the application loads the data into a set of tables within a dataset, applies the logon information, writes the data to each table, assigns the relevant report to the Crystal report viewer and .Shows the report.
All of this works and has been working for months. Yet a recent deployment on a Win XP Home (SP2) machine invokes the logon box for a single table at the reportviewer.Show statement. I.E. the table has already been logged on to - and data has been written to it. Other tables in the dataset do not suffer the problem.
Other reports suffer the same problem - a single table, not always the same one, requires a logon at .Show time.
And all other machines continue to work OK.
I can see from searches on the net that this logon issue for datatables and Crystal is problematic - so what gives? Is there a known issue here?
Any ideas/info gratefully received ...
|
|
|
|
|
Greetings Alan!
I too have suffered from the dreaded log on window appearing when it is not expected to . What *sometimes* helped me was to "verify database" to force Crystal to look at the data source again and clear up any issues that may exist. Hope that helps!
Joel Parmer
|
|
|
|
|
Hi Joel
And thanks for your reply. The problem is, as you say, maddening. I have now reported the issue to Microsoft Support - who seem to agree that I'm not the first to suffer it. Watch this space and I'll report what happens.
I'll try the 'verify database' you mention but I must admit that I'm not exactly sure what you mean. How would I do this?
Many thanks
Alan
|
|
|
|