vb6

Monitoring processes to see if they've crashed in vb6

断了今生、忘了曾经 提交于 2020-01-06 04:14:07
问题 I've got a program that tends to crash quite often while I'm asleep and I need to keep it running. So I thought I might writeup a vb6 application that monitors the process list, if something disappears it will relaunch it. Anyone know of an easy way? 回答1: You could use EnumProcesses to list every process in the system at the moment you're running you could use this declaration to use it Public Declare Function EnumProcesses Lib "psapi.dll" ( _ ByRef idProcess As Long, ByVal cb As Long, _

VB6 .NET Interop - Performance issue

不打扰是莪最后的温柔 提交于 2020-01-06 02:33:16
问题 I'm trying to use a VB6 app consumed in a C# app. The VB6 App is a Winform app. To do this, I have modified the VB6 App (EXE) to a DLL. Then I've referenced it in my C# app. In my VB App, I've add a new Class with some methods just to open VB forms. Everything works fine... except that if the form has many controls (30), the window is extremely slow to open (> 4s whereas < 1s in VB) 1/ Is this method good ? 2/ How to resolve this ? Regards, Florian EDIT : I know where is the problem but I don

Windows 7 - UAC - VB6 - Text File Can't Be “Seen” By Application

我的未来我决定 提交于 2020-01-06 02:26:08
问题 We've got a VB6 application that reads a simple text file with a .LIC file extension. When everything is working correctly, if the file exists in the same directory as the executable, it reads it. If not, it does other stuff. I've got a customer with Windows 7 machines, and if he right-clicks the EXE and "Runs as Administrator" it "sees" the LIC file. If he runs the EXE as a basic user, the LIC file cannot be seen. I've had enough issues with UAC to guess that UAC is running the application

ITaskbar HrInit method throws exception under RemoteApp

假装没事ソ 提交于 2020-01-05 22:20:10
问题 I have a WPF application that sometimes launches legacy VB6 windows. These VB6 windows are compiled as ActiveX DLLs and are launched ‘modally’ from the main WPF application. When the main WPF application launches the VB6 window, the VB6 window passes Me.Hwnd back to the main WPF application which uses ITaskbarList to display an icon on the Windows Taskbar. Code similar to below has worked for years (“value” is ultimately Me.Hwnd from the VB6 application). private ITaskbarList _taskbar;

Conditional Formatting Excel document via VB6 (issue with overwriting formats)

情到浓时终转凉″ 提交于 2020-01-05 19:23:58
问题 I'm creating an Excel document at runtime that has a bunch of values I'd like to have conditionally formatted. In going through various attempts from scratch as well as using/modifying code outputted from the Excel's macro recorder, I'm having a consistent issue related to formatting overwrites. I've posted a snippet of the code below and can say that I've tested to ensure my selection ranges are valid and appropriate for what I want conditionally formatted. There is some overlap but what's

Conditional Formatting Excel document via VB6 (issue with overwriting formats)

你离开我真会死。 提交于 2020-01-05 19:23:29
问题 I'm creating an Excel document at runtime that has a bunch of values I'd like to have conditionally formatted. In going through various attempts from scratch as well as using/modifying code outputted from the Excel's macro recorder, I'm having a consistent issue related to formatting overwrites. I've posted a snippet of the code below and can say that I've tested to ensure my selection ranges are valid and appropriate for what I want conditionally formatted. There is some overlap but what's

When calling Marshal.GetActiveObject( class id here) what would cause error 800401E3 (Operation Unavailable)?

泪湿孤枕 提交于 2020-01-05 12:58:46
问题 We have a scenario where some .NET code is attempting to access the current instance of a COM (actually DCOM) object. The object being accessed was developed in VB6. A current instance of it is available on the remote system, and appears to be accessed correctly from VB6 code. Attempting to call Marshal.GetActiveObject , specifying the class name, causes a COMException to be thrown, referencing error 800401E3 (Operation Unavailable). The same .NET code appears to operate correctly when run on

When calling Marshal.GetActiveObject( class id here) what would cause error 800401E3 (Operation Unavailable)?

随声附和 提交于 2020-01-05 12:58:06
问题 We have a scenario where some .NET code is attempting to access the current instance of a COM (actually DCOM) object. The object being accessed was developed in VB6. A current instance of it is available on the remote system, and appears to be accessed correctly from VB6 code. Attempting to call Marshal.GetActiveObject , specifying the class name, causes a COMException to be thrown, referencing error 800401E3 (Operation Unavailable). The same .NET code appears to operate correctly when run on

Time out error while executing the query

霸气de小男生 提交于 2020-01-05 07:55:51
问题 I am executing the following query in a stored procedure, transferring one year's transactions from one table to another: insert into table2 select * from table1 where dates between '20110101' and 20111231' When I use VB6 to call the stored procedure, it times out. I've tried to set the QueryTimeout property on my RDO Connection to five seconds like so: RdoConn.QueryTimeout = 5000 But it's still timing out. How can I prevent the execution of the query from timing out? 回答1: If you use an Ado

ReDim Byte array - “Out of memory” error?

被刻印的时光 ゝ 提交于 2020-01-05 06:36:20
问题 When I try to initialize(ReDim) Byte array with long data type then I am getting Run-time error : Out of memory exception. I have tried many ways but still no luck. It is Throwing Out of memory error if I ReDim Byte > 200000000 Dim bArr() As Byte Dim lSize As Long lSize = 210000000 ReDim bArr(0 To lSize) 'This statement is throwing out of memory error I want the Byte Array to accept the range of Long variable but getting Out of Memory error 来源: https://stackoverflow.com/questions/56059268