Question about Microsoft Visual Basic 6.0 (361-00686) for PC

1 Answer

Getting permission denied error with Kill

Hi ,
I am writing a log file handling program. I am using the ''Kernal32'' function lopen and lclose for calculating the size of file .
I am zipping file and want to delete a old log file but when i am deleting the file with
Kill ''C:demo_logfilelog estlog.log'' I am getting permission denied error.

Please Help me !!!!

Posted by on

  • 14 more comments 
  • tejashree_lo Jun 22, 2009

    Yes I did..

    Public Function GetLogFileSize(FilePath As String) As Double
    Dim Pointer As Long
    Dim sizeofFile As Long
    Pointer = lOpen(FilePath, OF_READ) 'size of the file
    sizeofFile = GetFileSize(Pointer, lpFSHigh)
    GetLogFileSize = sizeofFile '& " bytes" 'lclose Pointer
    End Function

    this is the function which I am using to calaulate the size of file...

  • tejashree_lo Jun 22, 2009

    Yes i did...

  • tejashree_lo Jun 22, 2009

    it is read only..

    but when I clear the check box of read only, next time its again becoming read only(without running program also)

    its not allowing me to remove the read-only permission.

    I have system administrator rights

  • tejashree_lo Jun 22, 2009

    Its not allowing me to remove read-only permission

  • tejashree_lo Jun 22, 2009

    "Use simple file sharing" was already unchecked ....

  • tejashree_lo Jun 22, 2009

    I am using VB 6.0

    I have to write script for deleting the file , I cant delete it manually ....

    Is there any other way to delete a file except Kill..

  • tejashree_lo Jun 23, 2009

    Thanks :)

  • tejashree_lo Jun 23, 2009


    I have another problem..

    I want to create a folder in registry and read and write from the registry using VB 60

    Please Help!!!!!!!!!

  • tejashree_lo Jun 23, 2009


    I have another problem..

    I want to create a folder in registry and read and write from the registry using VB 60

    Please Help!!!!!!!!!

  • tejashree_lo Jun 23, 2009

    Thanx a lot :)

    Actually i hav to pass source file path and destination file path to registry(In some folder) and want to read those paths from the registry...

  • tejashree_lo Jun 24, 2009


    What is mnuMRU?

    I want to create a folder in registry and save source and destination file path..

    I have tried below but its not working

    SaveSetting App.Title, "HKEY_CURRENT_USER\MyTestKey", "Testlog", "C:\demo_logfile\Testlog"

    GetSetting App.Title, "HKEY_CURRENT_USER\MyTestKey", "Testlog", "C:\demo_logfile\Testlog"

    I have to write a script so I am not using Dialog box, i have to directly get the source and destination file path from registry..

    PLs Pls Help me ..its being long time I am doing this ....

    Pls provide solution ....

  • tejashree_lo Jun 24, 2009

    Thanks a lot :):)

    I will try this.

  • tejashree_lo Jun 29, 2009

    Hiii Again ,

    How can I have the VB 6.0 program wait until a shell command is finished????

    I am writing a function to zip a file and just below that I have written KILL command to delete the originol file. but its not waiting for the zip to finish and it is deleting the log file which i have to zip .

    Plzzzzz provide the solution

  • tejashree_lo Jun 29, 2009

    Can i use some API to know wether Zip file is created or not ???

    PLzzzzzz help me its very URGENT

  • tejashree_lo Jun 30, 2009


    My PM told me to find some WinZip API and want me to get something return when the file is zipped..I searched but i didnt find any API related to WinZip which perform the Zip..

    Plz reply.

    how can i directly mail u ??

  • tejashree_lo Jun 30, 2009

    Thanks a lot :)

    It was really helpful .

    instead of replying to the same mail how can i ask something directly to u ?



1 Answer

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points


    An expert that got 10 achievements.


    An expert that got 5 achievements.

    Vice President:

    An expert whose answer got voted for 100 times.

  • Master
  • 428 Answers

Did u close the opened handle? after calculation?

Posted on Jun 22, 2009

  • 10 more comments 
  • Tharinda
    Tharinda Jun 22, 2009

    check whether the file is accessed by some part of ur program. if not go to the file and check properties to verify whether its read only or go to security tab and check whether u hv permission

  • Tharinda
    Tharinda Jun 22, 2009

    welll that's fine. Its an obvious thing :) have you tried to delete the file manually? Do it and see.
    If you don't have security tab in properties, get my computer and then go to Tools->Folder Options->view->Remove the tick for "Use simple file sharing(the very last option)"
    Then go to that tab and check whether your account is there with full permissions

  • Tharinda
    Tharinda Jun 22, 2009

    Open the file with full permission and then do your work. (if the handles are closed using Cose() on the stream objects...Don't open the file as read only.
    Try to delete the log file manually. Where did u create the file? Read only attribute is sometimes set to protect files. Its a normal thing. Specially for log files. You can create the file without the attribute using FileAttributes.Normal. But its fine to make it as read only coz its a log file.
    . I think you are using this namespace already
    I still think that there is a process which still locks your file.

  • Tharinda
    Tharinda Jun 22, 2009

    u need a script
    Go to this link
    I m in a hurry that's y I got late to reply you
    Please rate the answer

  • Tharinda
    Tharinda Jun 23, 2009

    ah that's easy I ll post it

  • Tharinda
    Tharinda Jun 23, 2009

    Saving Values In The Windows Registry

    SaveSetting appname, section, key, setting
    Here are the arguments for SaveSetting:
    • appname—String containing the name of the application to which the setting
    • section—String containing the name of the section where the key setting
    should be saved.
    • key—String containing the name of the key setting being saved.
    • setting—Expression containing the value to set the key to.

    Getting Values From The Windows Registry

    GetSetting( appname, section, key[, default])
    Here are the arguments passed to this function:
    • appname—String containing the name of the application or project whose key
    setting is requested.
    • section—String containing the name of the section where the key setting is
    • key—String containing the name of the key setting to return.
    • default—Expression containing the value to return if no value is

    Getting All Registry Settings
    You can use the GetAllSettings to get a list of key settings and their values from a section
    in the Windows Registry. Here’s how you use GetAllSettings:
    GetAllSettings( appname, section)
    Here are the arguments for GetAllSettings:
    • appname—String containing the name of the application whose key settings you
    • section—String containing the name of the section whose key settings you want.

    Deleting A Registry Setting
    You can delete Registry settings with the DeleteSetting statement:
    DeleteSetting appname, section[, key]


    Private Sub mnuOpen_Click()
    With dlgCommonDialog

    .DialogTitle = "Open"
    .CancelError = False
    .Filter = "All Files (*.*)[vbar]*.*"
    If Len(.FileName) = 0 Then
    Exit Sub
    End If
    If GetSetting(App.Title, "Settings", "Doc1") = "" Then
    Load mnuMRU(1)
    End If
    mnuMRU(1).Caption = .FileName
    mnuMRU(1).Visible = True
    SaveSetting App.Title, "Settings", "Doc1", .FileName
    End With
    End Sub

  • Tharinda
    Tharinda Jun 24, 2009

    Go here and see this will helpful to u
    Good Luck

  • Tharinda
    Tharinda Jun 24, 2009

    You are most welcome
    Its a pleasure to help you

  • Tharinda
    Tharinda Jun 29, 2009

    i see. ok I ll post

  • Tharinda
    Tharinda Jun 30, 2009

    I haven't used Winzip with VB projects but go here and have a look. There is working code at the bottom. I have used ZLIB once, go and check here also. Its easy to use. You can easily integrate those .dll s.
    If you want to wait until the Compression ends, you have to use a different function implementation which returns a value, to check whether the is finished.
    Hope this would help.

  • Tharinda
    Tharinda Jun 30, 2009

    I have found some very important API functions. You can do anything
    from these. I mean you can't write to here and there in the registry as
    u wish in vb without calling APIs. So here we go.

    Go here and check.

    And from here.


  • Tharinda
    Tharinda Jun 30, 2009

    :) I can't publicly give you the connection details, coz its prohibited na? For service providers its not allowed. Aap ko perm hain. Hum ko nahin :D . I know some hindi;)



1 Suggested Answer

  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.

Posted on Jan 02, 2017


Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add



Related Questions:


ZIP Password Recovery Tool

ZIP Password Unlocker is to recover ZIP password and recover WinZIP password for you to get into the archive. No matter how long or how complex your password is. This ZIP password recoverytool supports all versions of ZIP/WinZIP files with powerful functions.In addition to brute-force attack, it also offers a brute-force withmask attack for if you still remember part of the password. It is fullycustomizable too for you are allowed to create a dictionary file forthe program to base on. The program is super easy to use even a newuser can get used to the program in less than a minute to recover ZIP password and recover WinZIP password.

Features Of ZIP Password Recovery:

Supports all versions of ZIP/WinZIP files
Recovers long passwords in WinZIP/ZIP files
Easy to use for a new user is guaranteed to fully use it in less than a minute
Fast in speed to recover ZIP password and recover WinZIP password
Allows to offer password clues to the program to reduce the calculation, saving time
Allows you to create a dictionary for the program to base on
Allows you to set the mutation numbers
Allows to set computer CPU priority for a better performance
Automatically saves the recovery process every after a period of time
Supports to resume if accidentally stopped last time
Automatically shuts down computer after recovery

Supported Versions:
All WinZIP/ZIP files are supported.

Other relative articles:Thirteen steps to recover forgotten windows xp administrator password with Windows XP CD

on Apr 19, 2010 | Computers & Internet

1 Answer

Cannot get microfix usb digital microscope to work

That's probably a Windows privileges problem; only the administrator can write to the Program Files folder. Log in to the computer as administrator, open the MicroCapture program, find the settings for the file locations, and set up a folder in your (User Name) Documents for the MicroCapture files. Alternatively, modify the permissions for the MicroCapture folder (not recommended; do this only if MicroCapture won't let you use a different location).

Nov 30, 2014 | Computers & Internet

1 Answer

My computer retain this error and close application error code 3

I am also getting error code 3. I am able to transfer files using the exe. but running it from the scheduler/console I get:

permission denied
error code 3
error message from server permission denied.

why would I get that from the console and not from the ex
for more help visit CBR Tech Solutions

Apr 23, 2014 | Computers & Internet

1 Answer

I have a Casio fx 9750Gii.i cant write long program because i have already used all alpha key to continue writing the program

I believe you must rethink the design of your program
If you have several inputs that lead to a single result you want to keep for further calculations, enter the inputs, calculate your result and store in a variable. The intermediate variables can be set to zero (by precaution) and reused.
Use functions, and subroutines. Usually, in well designed programs, the scope of a variable defined inside a function or subroutine is local :It can't collide with the same name used globally (global scope). If a variable is no longer needed destroy it and reuse it.

Feb 23, 2014 | Casio FX-9750GPlus Calculator

1 Answer

I receive the error 'Network Initialization Failed: Permission Denied' when trying to launch Magicard ID software

Hi There,
This error happens when the user does not have read / write access to a file called PDOXUSRS.NET. Earlier versions of Magicard ID (before V3.02) stored this file on the root of the C: drive. If running on Windows Vista, the file cannot be accessed. The last version released (V3.05) in 2008 will run on Vista (32 bit only). If you are running V3.05 already, and still see this error, search for 'PDOXUSRS.NET'. It is probably in 'C:\Program Files\Magicard-ID\data'. Check the permissions on the file you must have read / write access to it. Try logging on as local admin. ensure any users who run Magicard ID have read / write permissions to this file. Magicard ID V3.05 can be found here;
NOTE! You will need to enter your printer's serial number in the QuickSearch box.

Hope this helps,


Sep 22, 2011 | Magicard Pro ID Badging Software Printer

1 Answer

Hi, I have a hp50g calc. I was wondering how i can install a formula library from a zip file onto my calc. but more importantly I was wondering if this calc has the functionality to calculate NPV(net...

Unzip it. Transfer it to a Secure Digital card, then plug the card in the SD-card slot. Use the File Manager/explorer and move the library to the Memory location you want.

Jul 09, 2011 | HP 50g Graphic Calculator

1 Answer

How do I unzip downloaded file on Vista and copy it to floppy disk,via usb to floppy converter? Thank you. Cathy.

Windows Vista has a built-in function for unzipping files in Explorer. Just right-click the filename and select Unzip from the menu. But I never use the built-in Windows function, because it's incredibly slow and has limited functionality.

My favorite is 7-Zip, which you can download from It will extract files of .zip, .rar, and many other archival formats, and it can split large files into small sections to be stored on several floppies.

7-zip adds a line in the context (right-click) menu of Explorer for 7-zip>, so you can unzip files right from Explorer. Splitting files requires starting 7-zip and finding the file in it's own explorer-like interface. Right-click the filename, and select Split... A little dialog box appears asking what size chunks you want to split the file into. In my test just now it defaulted to 1.44M floppy disk-sized sections. You also choose the folder you want the new files to go to. The actual splitting operation, even on this old Win 2000 computer splitting a 3.6M file, was virtually instantaneous.

The program is free for personal or business use.

Sep 21, 2010 | Toshiba Satellite Terca Portege USB...

1 Answer

WP Win Error message "access denied"

I think either the file and/or the directory are read-only. In the File Explorer, right clicking on the file will give you the properties including a box indicating if the file is read-only. A quick possibility is to save the file to a new location (with read/write permissions).

If you are the administrator of the computer (or the owner of the folder/file) you can change the status to allow for write privileges by changing that setting in the Properties.

I hope this helps.

Cindy Wells
(if you recently upgraded your OS or transferred the files from one computer to another, the file might not be "yours" to modify. I know that you can reset the permissions and change the owner but I don't remember the specifics. If you need more information, I can find my reference books if you tell me which OS you are using.)

Jan 19, 2010 | Corel WordPerfect Office X4 Home & Student...

1 Answer

How to use antilog?


As you well know the pH is the negative of the log in base 10 of the H+/H3O+ ion concentration. If we use [H+] to represent that concentration, then pH=-log[H+].
To obtain the [H+] you need to calculate the antilog. You write the definition in the form log[H+] =-pH and then calculate 10 to the power of each member. The equality remains valid as both members are treated similarly. Thus
10^( log[H+] ) = 10^(-pH)
Since raising 10 to a power is the inverse function of taking the log in base 10, 10^(log(x))=log(10^(x)) = x (they are inverse of one another), you are left with


Your calculator has a function [10 to x] accessed by pressing the [2nd] function key. To use it you must enter the negative value of the pH, press the [2nd] function key then the [10 to x], then the = key to get the result (concentration)
Exemple: let the pH=5.5, what is the H+ concentration?
With [(-)] being the change sign key, then
[H+]:[ (-) ] 5.5 [2nd][10 to x] [=]
The result is 0.000003162 or 3.16 x 10^(-6)

Hope it helps.

Dec 07, 2009 | Texas Instruments TI-30XA Calculator

Not finding what you are looking for?
Microsoft Visual Basic 6.0 (361-00686) for PC Logo

Related Topics:

1,175 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Computers & Internet Experts

micky dee

Level 3 Expert

2780 Answers

Piyal Perera
Piyal Perera

Level 3 Expert

528 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18394 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides