Commit for development environment setup
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
using namespace System::Reflection;
|
||||
using namespace System::Runtime::CompilerServices;
|
||||
|
||||
//
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
//
|
||||
[assembly:AssemblyTitleAttribute("")];
|
||||
[assembly:AssemblyDescriptionAttribute("")];
|
||||
[assembly:AssemblyConfigurationAttribute("")];
|
||||
[assembly:AssemblyCompanyAttribute("")];
|
||||
[assembly:AssemblyProductAttribute("")];
|
||||
[assembly:AssemblyCopyrightAttribute("")];
|
||||
[assembly:AssemblyTrademarkAttribute("")];
|
||||
[assembly:AssemblyCultureAttribute("")];
|
||||
|
||||
//
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the value or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
|
||||
[assembly:AssemblyVersionAttribute("1.0.*")];
|
||||
|
||||
//
|
||||
// In order to sign your assembly you must specify a key to use. Refer to the
|
||||
// Microsoft .NET Framework documentation for more information on assembly signing.
|
||||
//
|
||||
// Use the attributes below to control which key is used for signing.
|
||||
//
|
||||
// Notes:
|
||||
// (*) If no key is specified, the assembly is not signed.
|
||||
// (*) KeyName refers to a key that has been installed in the Crypto Service
|
||||
// Provider (CSP) on your machine. KeyFile refers to a file which contains
|
||||
// a key.
|
||||
// (*) If the KeyFile and the KeyName values are both specified, the
|
||||
// following processing occurs:
|
||||
// (1) If the KeyName can be found in the CSP, that key is used.
|
||||
// (2) If the KeyName does not exist and the KeyFile does exist, the key
|
||||
// in the KeyFile is installed into the CSP and used.
|
||||
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
|
||||
// When specifying the KeyFile, the location of the KeyFile should be
|
||||
// relative to the project directory.
|
||||
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
|
||||
// documentation for more information on this.
|
||||
//
|
||||
[assembly:AssemblyDelaySignAttribute(false)];
|
||||
[assembly:AssemblyKeyFileAttribute("E:\\proms.net\\Public Key\\vlnkey.snk")];
|
||||
[assembly:AssemblyKeyNameAttribute("")];
|
||||
|
@@ -0,0 +1,69 @@
|
||||
// This is the main DLL file.
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "DirectoryAndFileAPI.h"
|
||||
|
||||
using namespace DirectoryAndFileAPI;
|
||||
|
||||
char *DirAndFileFuncts::StringToCharStr(String *InStr)
|
||||
{
|
||||
int len = (InStr->get_Length)();
|
||||
char *rtnstr = new char [len+1];
|
||||
ZeroMemory(rtnstr,len+1);
|
||||
for (int i=0; i<len; i++)
|
||||
rtnstr[i] = (InStr->get_Chars)(i);
|
||||
return rtnstr;
|
||||
}
|
||||
|
||||
String *DirAndFileFuncts::GetLongName(String *NameIn)
|
||||
{
|
||||
char *tmpNameIn;
|
||||
char *tmpNameOut;
|
||||
char *fnPtr = NULL;
|
||||
int rtnval;
|
||||
|
||||
tmpNameIn = StringToCharStr(NameIn);
|
||||
|
||||
tmpNameOut = new char[1];
|
||||
memset(tmpNameOut,0,1);
|
||||
|
||||
// This will get the buffer size we need
|
||||
rtnval = GetFullPathName(tmpNameIn,1,tmpNameOut,&fnPtr);
|
||||
|
||||
if (rtnval > 1)
|
||||
{
|
||||
delete tmpNameOut;
|
||||
tmpNameOut = new char[rtnval+1];
|
||||
memset(tmpNameOut,0,rtnval+1);
|
||||
rtnval = GetFullPathName(tmpNameIn,rtnval,tmpNameOut,&fnPtr);
|
||||
}
|
||||
|
||||
NameOut = new String(tmpNameOut);
|
||||
return NameOut;
|
||||
}
|
||||
|
||||
String *DirAndFileFuncts::GetShortName(String *NameIn)
|
||||
{
|
||||
char *tmpNameIn;
|
||||
char *tmpNameOut;
|
||||
int rtnval;
|
||||
|
||||
tmpNameIn = StringToCharStr(NameIn);
|
||||
|
||||
tmpNameOut = new char[1];
|
||||
memset(tmpNameOut,0,1);
|
||||
|
||||
rtnval = GetShortPathName(tmpNameIn,tmpNameOut,1);
|
||||
|
||||
if (rtnval > 1)
|
||||
{
|
||||
delete tmpNameOut;
|
||||
tmpNameOut = new char[rtnval+1];
|
||||
memset(tmpNameOut,0,rtnval+1);
|
||||
rtnval = GetShortPathName(tmpNameIn,tmpNameOut,rtnval);
|
||||
}
|
||||
|
||||
NameOut = new String(tmpNameOut);
|
||||
return NameOut;
|
||||
}
|
@@ -0,0 +1,24 @@
|
||||
// DirectoryAndFileAPI.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Windows.h>
|
||||
#include <atlstr.h>
|
||||
#include <string.h>
|
||||
|
||||
using namespace System;
|
||||
|
||||
namespace DirectoryAndFileAPI
|
||||
{
|
||||
public __gc class DirAndFileFuncts
|
||||
{
|
||||
public:
|
||||
String *NameOut;
|
||||
DirAndFileFuncts() {};
|
||||
// TODO: Add your methods for this class here.
|
||||
String *GetLongName(String *NameIn);
|
||||
String *GetShortName(String *NameIn);
|
||||
private:
|
||||
char *StringToCharStr(String *InStr);
|
||||
};
|
||||
}
|
@@ -0,0 +1,21 @@
|
||||
Microsoft Visual Studio Solution File, Format Version 7.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DirectoryAndFileAPI", "DirectoryAndFileAPI.vcproj", "{A20EE163-393A-11D7-85C8-92B997000000}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
ConfigName.0 = Debug
|
||||
ConfigName.1 = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectDependencies) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{A20EE163-393A-11D7-85C8-92B997000000}.Debug.ActiveCfg = Debug|Win32
|
||||
{A20EE163-393A-11D7-85C8-92B997000000}.Debug.Build.0 = Debug|Win32
|
||||
{A20EE163-393A-11D7-85C8-92B997000000}.Release.ActiveCfg = Release|Win32
|
||||
{A20EE163-393A-11D7-85C8-92B997000000}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding = "Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.00"
|
||||
Name="DirectoryAndFileAPI"
|
||||
ProjectGUID="{A20EE163-393A-11D7-85C8-92B997000000}"
|
||||
Keyword="ManagedCProj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="E:\VE-PROMS.NET\BIN"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
ManagedExtensions="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG"
|
||||
MinimalRebuild="FALSE"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="3"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/DirectoryAndFileAPI.dll"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="2"
|
||||
CharacterSet="2"
|
||||
ManagedExtensions="TRUE">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG"
|
||||
MinimalRebuild="FALSE"
|
||||
UsePrecompiledHeader="3"
|
||||
WarningLevel="3"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
OutputFile="$(OutDir)/DirectoryAndFileAPI.dll"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="TRUE"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
|
||||
<File
|
||||
RelativePath="AssemblyInfo.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="DirectoryAndFileAPI.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Stdafx.cpp">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc">
|
||||
<File
|
||||
RelativePath="DirectoryAndFileAPI.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Stdafx.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;r">
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="ReadMe.txt">
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@@ -0,0 +1,31 @@
|
||||
========================================================================
|
||||
DYNAMIC LINK LIBRARY : DirectoryAndFileAPI Project Overview
|
||||
========================================================================
|
||||
|
||||
AppWizard has created this DirectoryAndFileAPI DLL for you.
|
||||
|
||||
This file contains a summary of what you will find in each of the files that
|
||||
make up your DirectoryAndFileAPI application.
|
||||
|
||||
DirectoryAndFileAPI.vcproj
|
||||
This is the main project file for VC++ projects generated using an Application Wizard.
|
||||
It contains information about the version of Visual C++ that generated the file, and
|
||||
information about the platforms, configurations, and project features selected with the
|
||||
Application Wizard.
|
||||
|
||||
DirectoryAndFileAPI.cpp
|
||||
This is the main DLL source file.
|
||||
|
||||
DirectoryAndFileAPI.h
|
||||
This file contains a class declaration.
|
||||
|
||||
AssemblyInfo.cpp
|
||||
Contains custom attributes for modifying assembly metadata.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
Other notes:
|
||||
|
||||
AppWizard uses "TODO:" to indicate parts of the source code you
|
||||
should add to or customize.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
@@ -0,0 +1,5 @@
|
||||
// stdafx.cpp : source file that includes just the standard includes
|
||||
// DirectoryAndFileAPI.pch will be the pre-compiled header
|
||||
// stdafx.obj will contain the pre-compiled type information
|
||||
|
||||
#include "stdafx.h"
|
@@ -0,0 +1,8 @@
|
||||
// stdafx.h : include file for standard system include files,
|
||||
// or project specific include files that are used frequently,
|
||||
// but are changed infrequently
|
||||
|
||||
#pragma once
|
||||
|
||||
#using <mscorlib.dll>
|
||||
|
Reference in New Issue
Block a user