Microsoft KB Archive/282233

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

Article ID: 282233

Article Last Modified on 10/15/2002

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q282233



SYMPTOMS
When you open a project and do anything that uses IntelliSense, you receive a &quot;permission denied&quot; 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 &quot;permission denied&quot; 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
 In Visual Basic, create a new ActiveX DLL project. Class1 is created by default.  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  On the File menu, save the project. On the File menu, select Make to compile the project. On the Project menu, select Properties, select the Component tab, and then set the Binary Compatibility to the compiled .dll. Close Visual Basic.</li> Reopen Visual Basic, and reload the .dll project you just created.</li> Drop down the list in the upper-left of the Class1 code window where it says &quot;(General),&quot; 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.)</li> Try to recompile the project, and note that you receive the &quot;permission denied&quot; error message.</li> Save the project, and then close Visual Basic.</li> 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.</li></ol>

Keywords: kbbug kbpending kbcompiler KB282233

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.