BUG: Permission Denied Error Message When You Try to Recompile a Visual Basic Project with a Public UDT and Binary Compatibility (282233)



The information in this article applies to:

  • Microsoft Visual Basic Professional Edition for Windows 6.0
  • Microsoft Visual Basic Enterprise Edition for Windows 6.0

This article was previously published under Q282233

SYMPTOMS

When you open a project and do anything that uses IntelliSense, you receive a "permission denied" error message when you try to recompile the project. The project defines a public User Defined Type (UDT) that it uses as a parameter to a public function, and binary compatibility is set.

RESOLUTION

Save the changes, and close your project. Then, reopen your project and compile it.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Note that there are other situations where you expect to receive a "permission denied" error message. For example, if you run another application to test your .dll, you are not able to recompile your .dll until the other application is closed and the .dll is released.

Steps to Reproduce Behavior

  1. In Visual Basic, create a new ActiveX DLL project. Class1 is created by default.
  2. Add the following code to Class1:
    Public Type MyType
       type1 as integer
       type2 as integer
    End Type
    
    Public Function F1 (t as MyType)
    End Function
    					
  3. On the File menu, save the project.
  4. On the File menu, select Make to compile the project.
  5. On the Project menu, select Properties, select the Component tab, and then set the Binary Compatibility to the compiled .dll.
  6. Close Visual Basic.
  7. Reopen Visual Basic, and reload the .dll project you just created.
  8. Drop down the list in the upper-left of the Class1 code window where it says "(General)," and select Class. This puts your cursor in the Class_Initialize procedure. Type Err. to see the IntelliSense. You can now press the BACKSPACE key to delete Err.. (You just want to view the IntelliSense, not add a line of code to the project.)
  9. Try to recompile the project, and note that you receive the "permission denied" error message.
  10. Save the project, and then close Visual Basic.
  11. Reopen Visual Basic, reload the project, and note that you are able to recompile it.NOTE: Instead of closing Visual Basic in the preceding steps, you can also start a new Standard EXE (or any other project type), and then reload the ActiveX DLL project.

Modification Type:MajorLast Reviewed:10/15/2002
Keywords:kbBug kbCompiler kbDSupport KB282233