RegQueryValueEx Reading Fails?
Jun 3, 2011
RegQueryValueEx function fails in this program
Module
Module1
Public Const HKEY_LOCAL_MACHINE = &H80000002
Public Const KEY_ALL_ACCESS = &HF003F
Public Const REG_OPTION_NON_VOLATILE = 0
Key is preserved when system is rebooted
[Code]...
View 9 Replies
ADVERTISEMENT
Oct 27, 2010
In out app we use dll that are loaded as addins. At startup we search the config files for these dlls in the application folder.The config files are named MyAddin.dll.config. On a win2003 R2 server running terminal services (in a domain with a SBS 2008) some of the users have problems reading the config files. I get an UnauthorizedAccessException when opening the config files like this:
Dim fs As New FileStream(strfile, FileMode.Open, FileAccess.Read)
reader = New System.Xml.XmlTextReader(fs)
fs.Close()
When I rename the files to MyAddin.config this works fine. Is the OS restricting the access to xxx.dll.config files?
View 2 Replies
May 17, 2012
I am connecting to a data stream that pushes data continuously and when I tried to set up a network stream I just could not connect and kept getting the 'not found' error. I used the httpwebrequest with webrequest.keepalive = true and started to consume the data by reading into a buffer and then appending to a stringbuilder. Once the stringbuilder reaches max size I flush it to a text file. The problem is that I get disconnected from the data stream because I am not reading the data fast enough. I need to keep the connection open and read the data while ensuring data gets stored in text files. If I use method "CONNECT" it does not connect to the stream.
While (True)
webrequest = DirectCast(Net.WebRequest.Create(url), HttpWebRequest)
webrequest.Credentials = New System.Net.NetworkCredential(username, password)
webrequest.Method = "GET"
[code]....
should I increase the buffer size and if so what is the max? that would mean I can read more data at a time and keep up with incoming push. Disparate here.
ACtually also I noticed that it gets stuck on this line
numbytesread = responseStream.Read(bufferread, 0, BUFFER_SIZE)
and then eventually I get disconnected.
View 1 Replies
May 17, 2012
I am connecting to a data stream that pushes data continuously and when I tried to set up a network stream I just could not connect and kept getting the 'not found' error. I used the httpwebrequest with webrequest.keepalive = true and started to consume the data by reading into a buffer and then appending to a stringbuilder. Once the stringbuilder reaches max size I flush it to a text file. The problem is that I get disconnected from the data stream because I am not reading the data fast enough. I need to keep the connection open and read the data while ensuring data gets stored in text files.If I use method "CONNECT" it does not connect to the stream.[code]
View 1 Replies
Sep 23, 2010
I have a VB program that I'm trying to deploy. On my machine (the app works fine straight from VS), when I try to install it from the webpage, it asks me to setup .net. I only have a choice of repairing or uninstalling .net. I've tried both but both fail at the moment. The problem with the repair is, although it goes through the entire repair procedure, it then asks me to restart my PC, but when I hit 'restart', nothing happens. So I restart manually, but when I try again, I just have to go through the same procedure again.
View 2 Replies
Jul 10, 2009
All 3 statements below do NOT download the file; BUT also do not create any error msgs! owever, when pluggingFTP://localhost/QMSpathFTP/Prozess Akquisition.doc directly into the IE the .doc is shown correctly! I.e., to me, the virtual directory 'QMSpathFTP' is correct!
View 2 Replies
Dec 9, 2011
Why is hi failing to even hit the event? This should be htting the event, I see no reason why it would not hit this event when I press the enter key, instead I get a beep sound.
Private Sub Browser_1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
If e.KeyCode = Keys.Enter Then
WebBrowser.Navigate(tb_Address.Text)
End If
End Sub
View 5 Replies
Jul 22, 2009
I'm trying to write a program to control input. Unfortunately, thing always seems to fail.
The thing always comes up with "Application Defined or Object Defined Error". It doesn't help that I can't find the complete listing of error codes[code]...
View 2 Replies
Dec 6, 2010
The following code works fine in Access 2007 but VB 2005 Dataset refuses to see it. 2 questions Why? and how do I call a function in a Tableadapter query? "sizecats" is a function that extracts a substring depending on the length of ContainerRef.
SELECT sizecats([ContainerRef]) AS [Size], Count(tbl_Bookings_Containers.ContainerUsageID) AS CountOf
FROM tbl_Bookings_Containers
GROUP BY sizecats([ContainerRef]);
View 1 Replies
May 18, 2011
I use vb.net to backup sql '05 - '08 databases. It works great on smaller databases. but when it comes to large databases it fails at 30 or 40 percent with the error: The backup or restore was aborted.
Dim objBackup1 As Backup = New Backup() With {.Action = BackupActionType.Database, .Database = Common.DsSettings("DataBase", Nothing), .Initialize = True, .Checksum = True, .ContinueAfterError = True, .Incremental = False, .LogTruncation = BackupTruncateLogType.Truncate}
objBackup1.SqlBackup(objServer)
View 2 Replies
Jul 21, 2011
I am trying to flatten a multi-dimensional array with ConvertAll but I can't get it to work:
Private Function Flatten(ByRef a As Object) As Object
Dim elements As Integer = 0
Dim size As Integer[code]...
Why does it throw NullReferenceException?
View 1 Replies
May 24, 2010
I wrote an application on windows XP using visual studio 2008. Based on the .net framework 3.5. For some reason that I do not understand the application refuses to run on windows 7. You would think that if the .net framework 3.5 was installed on the windows 7 machine it would run.
View 10 Replies
May 5, 2011
I'm catching the following error in a publishing script (VB.Net) I'm running:
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
The code that fails is:
My.Computer.FileSystem.WriteAllText(path, content, False)
It runs fine for most of the files but some have a '~' in the path and those ones are all failing.
Just to clarify: i am using the full path an example of the path i am having problems with is "c:/websites/xml/myfile~test.xml" the ones that work are "c:/websites/xml/myfiletest2.xml"
View 1 Replies
Aug 2, 2009
I currently have this line of code which has been working for the past 6 months:
If IsNumeric(txtProductID.Text) Then
...do stuff
Else
Dim msg As String = "Error!"
End If
All of the sudden, no matter what kind of entry is put in txtProductID (including plain numbers), it fails! Is there reason for me to be going crazy over this?
View 3 Replies
Mar 7, 2011
I am currently using the AsyncFileUpload in my VB.NET web app. Locally it works perfectly, however on the server it fails to upload a small file (<9k). I can't even seem to debug this as in JavaScript handlers I have no idea as to how to get the error reason.
function uploadError(sender,args) {
$get("<%=LabelErr.ClientID%>").innerHTML = "Unable to Upload file for the following reason: ", "<span style='color:red;'>" + args.get_errorMessage() + "</span>";
[code].....
View 1 Replies
Mar 21, 2011
A VB2010 program fails to build because it doesn't recognise left() and right(). mid() works, though.
Microsoft.visualbasic.left() works ok.
Yet, in another VB2010 program, left() and right() work ok.
View 3 Replies
Apr 7, 2012
I have just finished my application using VB in Visual Studio 2005 and it works fine on my Win 7 development machine. But when I install and run it on an XP machine it fails with an unhandled exception:System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {E8D851FA-9967-4ADF-9644-0183B9B1EA68} failed due to the following error: 80040154.
I've googled the error message and the solutions seem to be 1) compile as x86 (was doing that anyway), and 2) register the dll on the machine But firstly I'm not sure which dll I need to register, and secondly I don't want to be going around registering dlls - the whole point of the installation programs is that it should just install and configure everything automatically..
View 10 Replies
Nov 18, 2010
I am getting one issue while working with DTS Package using VB.Net application. I am using the following code to execute the DTS package.
[Code]...
View 3 Replies
Nov 23, 2010
My problem is that when trying to print out a excel worksheet, after it has just beeen printed out onces. It gives me this error: "Object reference not set to an instance of an object", when trying to open the existing worksheet(the template)
I've really tryed to fix it, I think that the problem is that after the first print, i need to clear the worksheet and the excelapp.[code]...
View 6 Replies
Nov 19, 2009
I am trying to insert a picture in the RTB but my system hangs when I try to do it... No error message... it simply hangs... I also get a tough time calling the Task Manager to end it...
This is the code that I am using...
Is it going into an infinite loop?
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles Button1.Click
[Code]....
View 6 Replies
Jan 13, 2012
I am using the following function to backup a SQL Server database using SMO.. but the backup fails... I have no idea, why does it fail...
[Code]....
View 1 Replies
Dec 8, 2009
I am developing a vb script to query an Access 2000 database and return the data to a recordset and place it in to an Excel Spreadsheet. However I am not able to Complete the CopyRecordSet to the Excel spreadsheet I receive the runtime error "Microsoft VBScript runtime error: Class doesn't support Automation" at line "xlWs.Range("A1").CopyFromRecordset rs " [code]
View 6 Replies
Jun 17, 2012
I've been trying to convert some old VB6 code to VB.Net and ran into a programming problem. Basically the Set keyword from vb6 is no longer used in VB.Net 2008 and 2010. So with that said, this won't work in .Net, (assuming you referenced the ActiveMovie control type library in vb6, which is basically DirectShow):
[Code]...
View 3 Replies
Aug 18, 2010
Very simple update. It simply fails, no error, no change gets made to the database.Dim db As New BarClassesDataContext Dim foo = (From a In db.articles Where a.id = 14 Select a).Single Response.Write("<h3>" & foo.title & "</h3>") foo.title = "This is my new, updated title for article ID #14"
db.SubmitChanges()
Here is the relevent portion of my article class. Also, this is a web form so I have no console. Is there another way to view the T-SQL output?
<Table(Name:="dbo.article")> _
Partial Public Class article
Private _id As Integer
Private _issueid As Integer
Private _dateadded As Date
[Code]...
View 3 Replies
Jul 25, 2011
I have an issue with building a project using the MSBuild (ver 4) from the command line when declaring lambda expression like this:
Private Sub Foo(ByVal s As String)
Dim WL = Sub(str As String)
If Not String.IsNullOrEmpty(str) Then[code]......
View 1 Replies
Jun 10, 2010
I have an add-in that creates a form, adds controls to it, then tries to add some more. But on the second attempt to add controls, they disappear. If I have an error in my code that gets displayed in a message box I can see the new controls behind it. When I click OK they disappear. If I have no error and step through the code, they are there according to properties, although I can't see them because the form will not display while in debug mode. When the program finishes, th controls that were created are gone. Perhaps I am selecting the form to edit wrong.Too bad there isn't any documentation (or any than can be found) that describes how to do this.[code]...
View 5 Replies
Dec 1, 2011
This assignment works for me TryCast(Me.NamingContainer, LDHello).ToggleChartConfigurationSections = AddressOf LD_SayHello whereas Dim objLDHello As LDHello = TryCast(Me.NamingContainer, LDHello) AddHandler objLDHello.LoveAndLoveOnly, AddressOf LDSayHello fails with an error message like LoveAndLoveOnly is not an event of Universal.LDHello. Visual Studio intellisense is able to pickup the event whereas the background vbc and build compiler are failing. When I need to stack multiple subscribers to the event I need to use AddHandler right?
View 6 Replies
May 3, 2010
I have a VB.net Solution in VS 2008 with 2 projects in it (The machine is running Windows XP Professional). I can build the one project fine. The other one the build keeps failing. Their are no errors in the code. I don't get any message when the build fail except, VS ask me if i want to run the last successful build. I have tryed cleaning the solution and then building and rebuilding it.
View 1 Replies
Mar 16, 2010
I added a setup project to a winform vb.net app which otherwise builds fine. Once the setup project is added to the solution, however, the build fails with the following error;Unrecoverable build error.As there does not seem to be much information I can't figure what the problem is. What can I do from here to fix this to get deployment package?
View 1 Replies
May 26, 2009
I've installed VS 2008 on a new workstation and everything works fine except that the second time the solution is built it fails when it attempts to overwrite a .resx file in the bin folder stating that the permissions are not sufficient to overwrite the file. Deleting the bin files and building the solution works fine. The logged in user has full control permissions to the directory. I have a feeling this may be a simple issue, but I cannot find anything relating to the problem in my searches. If this is the wrong forum,
View 1 Replies