How to upgrade a VB6 application from XP to Vista?

I am working on a vb6 application that has problems with Vista, for obvious reasons (writing to program files and other things that are no longer allowed by default).

  • Where should I store application data or user-saved files?
  • Do I need to create privileges to create folders and files?
  • What other common actions will cause problems?
  • The program has an update program that should download and register files, how can I increase privileges in doing so?

Some of these questions have obvious answers, but I want to get the obvious things right.

+3
source share
4 answers

, , . , , , .

1) ?

, . , Users/AppData, , Common/AppData​​p >

  If SHGetFolderPath(0, CSIDL_COMMON_APPDATA, -1, SHGFP_TYPE_CURRENT, sTempPath) = 0 Then
      sCommonAppdata = Left$(sTempPath, InStr(1, sTempPath, Chr(0)) - 1) &  "CompanyName\AppName"
  End If

CSIDL_APPDATA AppData Users. . XP Vista, , , .

2) ?

Adminsitrator - Program Files, , ! , API VB API - Program Files.

3) ?

. , IPC Named Pipes ( , , ). , , UAC . , LOCAL_MACHINE , LOCAL_USER, (. ).

4) , , (sic), ?

, VB6, , api VB6, , , API. , . , - .

+3

UAC ActiveX . \users \programdata.

0

, Vista , . , , , C:\Program Files, , , .

: Windows Vista Dr. Dobb's.

0

Karl Peterson has written a good article on where to store user data and application data, with a VB6 class that retrieves the location of special paths for you.

0
source

Source: https://habr.com/ru/post/1703445/


All Articles