Problem getting common dialog to appear in NT 4.0 
Author Message
 Problem getting common dialog to appear in NT 4.0

I have code to find a file using the comdlg32.dll in an access 97
application.  I don't want the installation problems that come with the use
of the comdlg32.ocx.  The problem is that the code works fine in win95 and
win98 but not in NT 4.0(sp3).  I don't receive an error in NT it just will
not show the dialog.  Does any one know of any issues with the comdlg32.dll?
Do I need to declare the api function any differently in NT? It does not
make sense to me.

Thomas Lane
tushaus computer services



Sat, 26 May 2001 03:00:00 GMT  
 Problem getting common dialog to appear in NT 4.0
You are not alone.  I have the same problem with this function and am
looking for the solution too.
FYI, I have had other API calls work fine in Windows 95 and Access 97 and
fail in NT 4.0 sp3, but was able to trace the problem to an inconsistency
between type declarations in the Declare Function statement and the actual
Access Basic that calls the external function.  Something as simple as
having a variable declared as an Integer in the Declare Function... and as
a Long in the calling Function works fine in Win 95 but not in NT.  It
seems that Win 95 is very forgiving of what appears to be sloppy
programming, whereas NT is not.  This may help you with other API calls
that are not working, but probably not with comdlg32.dll.

Let me know if you've found a fix!



Quote:
> I have code to find a file using the comdlg32.dll in an access 97
> application.  I don't want the installation problems that come with the
use
> of the comdlg32.ocx.  The problem is that the code works fine in win95
and
> win98 but not in NT 4.0(sp3).  I don't receive an error in NT it just
will
> not show the dialog.  Does any one know of any issues with the
comdlg32.dll?
> Do I need to declare the api function any differently in NT? It does not
> make sense to me.

> Thomas Lane
> tushaus computer services




Sat, 26 May 2001 03:00:00 GMT  
 Problem getting common dialog to appear in NT 4.0
Hi Thomas,

This problem is caused by two variables in the User Defined Type not being
initialized properly.  Look for

        .strCustomFilter = 0
        .nMaxCustFilter = 0

and change them to

       'New for NT 4.0
        .strCustomFilter = String(255, 0)
        .nMaxCustFilter = 255

HTH
--
Dev Ashish    (Just my $.001)
The Access Web ( http://home.att.net/~dashish )
----

:I have code to find a file using the comdlg32.dll in an access 97
:application.  I don't want the installation problems that come with the use
:of the comdlg32.ocx.  The problem is that the code works fine in win95 and
:win98 but not in NT 4.0(sp3).  I don't receive an error in NT it just will
:not show the dialog.  Does any one know of any issues with the
comdlg32.dll?
:Do I need to declare the api function any differently in NT? It does not
:make sense to me.
:
:Thomas Lane
:tushaus computer services

:
:



Sat, 26 May 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Problems with File Open common dialog on NT 4.0 in Access 97

2. Problem with NT 4.0 and Common Dialogs

3. Problem with NT 4.0 and Common Dialogs

4. Problem with NT 4.0 and Common Dialogs

5. NT 4.0 Printer Setup Dialog Common Control

6. NT 4.0 Printer Setup Dialog Common Control

7. NT 4.0 Printer Setup Dialog Common Control

8. Problem Getting Microsoft Common Dialog Added To Toolbar

9. Problems with Print Common dialog under NT

10. Common Dialog Print NT problem

11. Controlling what appears in Common dialog boxes being used by *other* apps

12. Getting ODBC dialog box to appear using ADO?

 

 
Powered by phpBB® Forum Software