Class NsWinHelper
Dispatcher / helper class for Windows code. NOTE: THERE ARE SEVERE LIMITS ON THE NUMBER OF USING's YOU CAN HAVE IN THIS FILE! Too many and the C++ compiler will crash with a stack overflow, believe it or not.
Namespace: SuperOffice.Util
Assembly: SoDataBase.dll
Syntax
public static class NsWinHelper : Object
Remarks
It may seem that the C++ compiler (at least in 2010 version) does not have enough space allocated for symbol tables created when pulling in Managed namespaces - some kind of escalation/drill-down happens and you get a compile-time hard crash with an overflow diagnostic. Using a two-level dispatch like here is a (the only?) way out.
Methods
CheckUpgradeToNewPricelist(String, String, String)
Check if it's possible to upgrade all users in the database from their current 7.5 licenses to the new pricelist in 10.0
Declaration
public static void CheckUpgradeToNewPricelist(string systemUser, string password, string additionalInfo)
Parameters
Type | Name | Description |
---|---|---|
String | systemUser | |
String | password | |
String | additionalInfo |
Remarks
It may seem that the C++ compiler (at least in 2010 version) does not have enough space allocated for symbol tables created when pulling in Managed namespaces - some kind of escalation/drill-down happens and you get a compile-time hard crash with an overflow diagnostic. Using a two-level dispatch like here is a (the only?) way out.
Exceptions
Type | Condition |
---|---|
SoException | If something is not OK, the relevant exception will be thrown |
GetBaseUrl()
Dispatcher / helper class for Windows code. NOTE: THERE ARE SEVERE LIMITS ON THE NUMBER OF USING's YOU CAN HAVE IN THIS FILE! Too many and the C++ compiler will crash with a stack overflow, believe it or not.
Declaration
public static string GetBaseUrl()
Returns
Type | Description |
---|---|
String |
Remarks
It may seem that the C++ compiler (at least in 2010 version) does not have enough space allocated for symbol tables created when pulling in Managed namespaces - some kind of escalation/drill-down happens and you get a compile-time hard crash with an overflow diagnostic. Using a two-level dispatch like here is a (the only?) way out.
GetShopUrl(String, String)
Get the shop url for a module owner, including a context string
Declaration
public static string GetShopUrl(string ownerName, string context)
Parameters
Type | Name | Description |
---|---|---|
String | ownerName | |
String | context |
Returns
Type | Description |
---|---|
String |
Remarks
It may seem that the C++ compiler (at least in 2010 version) does not have enough space allocated for symbol tables created when pulling in Managed namespaces - some kind of escalation/drill-down happens and you get a compile-time hard crash with an overflow diagnostic. Using a two-level dispatch like here is a (the only?) way out.
GetUniqueFileName(String)
This will get a unique file name in the given path.
Declaration
public static string GetUniqueFileName(string completeFilePath)
Parameters
Type | Name | Description |
---|---|---|
String | completeFilePath | Complete file path including the file name |
Returns
Type | Description |
---|---|
String | A string to a unique filename with no path which is guaranteed not to exist in the path provided. |
Remarks
this will ensure to return an unique file name for the given location If it finds a file(s) with the same name it will create a filename with a suffix with a proper index. e.g It'll create Test[2].docx (if it finds the Test.docx & Test[1].docx in the requested location
LicenseExists(String)
Determine if a license (owner.module) exists at all - regardsless of numbers, assignment etc
Declaration
public static bool LicenseExists(string license)
Parameters
Type | Name | Description |
---|---|---|
String | license |
Returns
Type | Description |
---|---|
Boolean |
Remarks
It may seem that the C++ compiler (at least in 2010 version) does not have enough space allocated for symbol tables created when pulling in Managed namespaces - some kind of escalation/drill-down happens and you get a compile-time hard crash with an overflow diagnostic. Using a two-level dispatch like here is a (the only?) way out.
LoadNewLicenseFromServerIfNeeded()
Check nextCheckDate on all modules, and call server for those that are in the past
Declaration
public static void LoadNewLicenseFromServerIfNeeded()
Remarks
It may seem that the C++ compiler (at least in 2010 version) does not have enough space allocated for symbol tables created when pulling in Managed namespaces - some kind of escalation/drill-down happens and you get a compile-time hard crash with an overflow diagnostic. Using a two-level dispatch like here is a (the only?) way out.
MakeLegalFileNameAndDirectory(String)
Given a suggested file name (typically derived from a document.header), and make it legal; create directories on the way
Declaration
public static string MakeLegalFileNameAndDirectory(string suggestedFullPathWithExtension)
Parameters
Type | Name | Description |
---|---|---|
String | suggestedFullPathWithExtension |
Returns
Type | Description |
---|---|
String |
Remarks
It may seem that the C++ compiler (at least in 2010 version) does not have enough space allocated for symbol tables created when pulling in Managed namespaces - some kind of escalation/drill-down happens and you get a compile-time hard crash with an overflow diagnostic. Using a two-level dispatch like here is a (the only?) way out.
MapAndValidateLicenseWithDb(LicenseInfo)
Get the current license from the database, map the incoming one on to it, and validate to see if the result is acceptable (can be Activated)
Declaration
public static ExtendedLicenseInfo MapAndValidateLicenseWithDb(LicenseInfo info)
Parameters
Type | Name | Description |
---|---|---|
LicenseInfo | info |
Returns
Type | Description |
---|---|
ExtendedLicenseInfo | License including activation flags and problem tag |
Remarks
It may seem that the C++ compiler (at least in 2010 version) does not have enough space allocated for symbol tables created when pulling in Managed namespaces - some kind of escalation/drill-down happens and you get a compile-time hard crash with an overflow diagnostic. Using a two-level dispatch like here is a (the only?) way out.
PopulateSignedPublicKey(LicenseInfo, Stream)
Dispatcher / helper class for Windows code. NOTE: THERE ARE SEVERE LIMITS ON THE NUMBER OF USING's YOU CAN HAVE IN THIS FILE! Too many and the C++ compiler will crash with a stack overflow, believe it or not.
Declaration
public static void PopulateSignedPublicKey(LicenseInfo licenseInfo, Stream publicKey)
Parameters
Type | Name | Description |
---|---|---|
LicenseInfo | licenseInfo | |
Stream | publicKey |
Remarks
It may seem that the C++ compiler (at least in 2010 version) does not have enough space allocated for symbol tables created when pulling in Managed namespaces - some kind of escalation/drill-down happens and you get a compile-time hard crash with an overflow diagnostic. Using a two-level dispatch like here is a (the only?) way out.
SetCachedPreference(String, String, String)
Dispatcher / helper class for Windows code. NOTE: THERE ARE SEVERE LIMITS ON THE NUMBER OF USING's YOU CAN HAVE IN THIS FILE! Too many and the C++ compiler will crash with a stack overflow, believe it or not.
Declaration
public static void SetCachedPreference(string section, string key, string value)
Parameters
Type | Name | Description |
---|---|---|
String | section | |
String | key | |
String | value |
Remarks
It may seem that the C++ compiler (at least in 2010 version) does not have enough space allocated for symbol tables created when pulling in Managed namespaces - some kind of escalation/drill-down happens and you get a compile-time hard crash with an overflow diagnostic. Using a two-level dispatch like here is a (the only?) way out.
StartForcePreferenceCacheInit()
Dispatcher / helper class for Windows code. NOTE: THERE ARE SEVERE LIMITS ON THE NUMBER OF USING's YOU CAN HAVE IN THIS FILE! Too many and the C++ compiler will crash with a stack overflow, believe it or not.
Declaration
public static AsyncContext StartForcePreferenceCacheInit()
Returns
Type | Description |
---|---|
AsyncContext |
Remarks
It may seem that the C++ compiler (at least in 2010 version) does not have enough space allocated for symbol tables created when pulling in Managed namespaces - some kind of escalation/drill-down happens and you get a compile-time hard crash with an overflow diagnostic. Using a two-level dispatch like here is a (the only?) way out.
UpgradeToNewPricelist(String, String, String, ProgressEstimateCallback, ProgressStepCallback)
Upgrade all users in the database from their current 7.5 licenses to the new pricelist in 10.0
Declaration
public static bool UpgradeToNewPricelist(string systemUser, string password, string additionalInfo, ProgressEstimateCallback estimateCB, ProgressStepCallback stepCB)
Parameters
Type | Name | Description |
---|---|---|
String | systemUser | |
String | password | |
String | additionalInfo | |
ProgressEstimateCallback | estimateCB | |
ProgressStepCallback | stepCB |
Returns
Type | Description |
---|---|
Boolean |
Remarks
It may seem that the C++ compiler (at least in 2010 version) does not have enough space allocated for symbol tables created when pulling in Managed namespaces - some kind of escalation/drill-down happens and you get a compile-time hard crash with an overflow diagnostic. Using a two-level dispatch like here is a (the only?) way out.