Ejemplo n.º 1
0
        internal static string GetCachePath(bool CreateDir)
        {
            StringBuilder lpBuf = new StringBuilder(0x400, 0x400);
            uint          uSize = 0x400;

            Publish.GetSystemDirectory(lpBuf, uSize);
            string path = lpBuf.ToString() + @"\com\SOAPCache\";

            if (CreateDir)
            {
                try
                {
                    if (!Directory.Exists(path))
                    {
                        Directory.CreateDirectory(path);
                    }
                }
                catch (Exception exception)
                {
                    if ((exception is NullReferenceException) || (exception is SEHException))
                    {
                        throw;
                    }
                    ComSoapPublishError.Report(exception.ToString());
                }
            }
            return(path);
        }