HOME 首页
SERVICE 服务产品
XINMEITI 新媒体代运营
CASE 服务案例
NEWS 热点资讯
ABOUT 关于我们
CONTACT 联系我们
创意岭
让品牌有温度、有情感
专注品牌策划15年

    自定义文件和所有文件的区别(自定义文件什么意思)

    发布时间:2023-03-05 05:37:43     稿源: 创意岭    阅读: 350        问大家

    大家好!今天让创意岭的小编来大家介绍下关于自定义文件和所有文件的区别的问题,以下是小编对此问题的归纳整理,让我们一起来看看吧。

    创意岭作为行业内优秀的企业,服务客户遍布全球各地,相关业务请拨打电话:175-8598-2043,或添加微信:1454722008

    本文目录:

    自定义文件和所有文件的区别(自定义文件什么意思)

    一、右键中出现了一个自定义文件夹,而且只有在一个打开的文件夹里面有,其他时候就没有高分求解!!!!!

    无须担心,不是电脑出问题。

    这确实是系统自带的功能,可以对文件夹进行自定义,包括文件夹类型,更换文件夹图标等。

    至于有时候有,有时候没有是,因为你所处的文件夹不同,有的文件夹允许自定义,有的不允许。

    比如说你进C盘的Windows文件夹中点击右键,就一定没有“自定义”;但是你自己在桌面上新建一个文件夹,点击打开后在右键单击,就会有“自定义”这个选项。

    二、关于自定义文件格式(VB)

    Attribute VB_Name = "Module1"

    Public Const PROCESS_VM_READ = &H10

    Public Const TH32CS_SNAPPROCESS = &H2

    Public Const MEM_COMMIT = 4096

    Public Const PAGE_READWRITE = 4

    Public Const PROCESS_CREATE_THREAD = (&H2)

    Public Const PROCESS_VM_OPERATION = (&H8)

    Public Const PROCESS_VM_WRITE = (&H20)

    Public Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Long, ByVal lpBuffer As String, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long

    Public Declare Function GetLastError Lib "kernel32" () As Long

    Public Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As Long, ByVal lpAddress As Long, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As Long

    Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Long, ByVal lpBuffer As String, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long

    Public Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long

    Public Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long

    Public Declare Function Process32First Lib "kernel32" (ByVal hSnapshot As Long, lppe As PROCESSENTRY32) As Long

    Public Declare Function CreateToolhelp32Snapshot Lib "kernel32" (ByVal dwFlags As Long, ByVal th42ProcessID As Long) As Long

    Public Declare Function CreateRemoteThread Lib "kernel32" (ByVal hProcess As Long, ByVal lpThreadAttributes As Long, ByVal dwStackSize As Long, ByVal lpStartAddress As Long, ByVal lpParameter As Long, ByVal dwCreationFlags As Long, lpThreadId As Long) As Long

    Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long

    Public Declare Function Process32Next Lib "kernel32" (ByVal hSapshot As Long, lppe As PROCESSENTRY32) As Long

    Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long

    Public Type PROCESSENTRY32

    dwSize As Long

    cntUseage As Long

    th42ProcessID As Long

    th42DefaultHeapID As Long

    th42ModuleID As Long

    cntThreads As Long

    th42ParentProcessID As Long

    pcPriClassBase As Long

    swFlags As Long

    szExeFile As String * 1024

    End Type

    Public Sub EnumAndInject()

    Dim MySnapHandle As Long

    Dim ProcessInfo As PROCESSENTRY32

    Dim MyRemoteProcessId As Long

    Dim MyDllFileLength As Long

    Dim MyDllFileBuffer As Long

    Dim MyReturn As Long

    Dim MyStartAddr As Long

    Dim MyResult As Long

    Dim temp As Long

    Dim DllFileName As String

    MySnapHandle = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0)

    ProcessInfo.dwSize = Len(ProcessInfo)

    If Process32First(MySnapHandle, ProcessInfo) <> 0 Then

    Do

    Debug.Print ProcessInfo.szExeFile

    If InStr(LCase(ProcessInfo.szExeFile), "notepad.exe") > 0 Then

    '遍历进程,查找notepad.exe

    MyRemoteProcessId = OpenProcess(PROCESS_CREATE_THREAD + PROCESS_VM_OPERATION + PROCESS_VM_WRITE + PROCESS_VM_READ, False, ProcessInfo.th42ProcessID)

    '打开进程获得notepad的句柄供后面的操作使用

    'DllFileName = "C:\Program Files\Microsoft Visual Studio\VB98\DATAVIEW.DLL"

    MyDllFileLength = Len(DllFileName) + 1

    '学过C语言的朋友应该知道字符串最后要一个ASCII 0标志结尾,所以要加1

    MyDllFileBuffer = VirtualAllocEx(MyRemoteProcessId, 0, MyDllFileLength, MEM_COMMIT, PAGE_READWRITE)

    '在指定进程里申请一块内存区域出来供我们存放字符串“c:\test.dll“

    '传string给api时,byval byref有区别,应该使用byval,这样会传给api一个标准的C字符指针,不能byref,否则函数调用没问题

    '但是起不到预期效果,VirtualAllocEx返回的是申请到的内存地址值.

    MyReturn = WriteProcessMemory(MyRemoteProcessId, MyDllFileBuffer, DllFileName, MyDllFileLength, temp)

    '向刚才申请的内存中写入dll文件路径字符串

    '顺便说一下,很多api浏览器上的api声明都是错的,包括VB6自带的也不例外,writeprocessmemory第二个参数要的是

    'lpBaseAddress 但是这个值不能传址得到,如果你按byref传址,实际上传的是MyDllFileBuffer变量的地址,而不是它里面存放的那个数字

    '上面说了MyDllFileBuffer的数值才是WriteProcessMemory要的地址,所以声明API的时候一定要byval,大家知道空着不写就是默认byref

    '下面还有几处不该传址的参数,只要搞清楚API函数要的到底是什么值才可以确定到底传值还是传址,API浏览器仅能供参考,还是要仔细阅读MSDN

    MyStartAddr = GetProcAddress(GetModuleHandle("Kernel32"), "LoadLibraryA")

    '获取loadlibrary函数的地址,这个函数可以载入指定的dll文件,那他的参数呢?就是我们刚才在notepad.exe进程里写入的“c:\test.dll“

    '不过还得让CreateRemoteThread告诉他.另外简单的说一下windows下应用程序的内存管理,我也不很懂,呵呵,win32下的应用程序

    '的内存区域是隔开的,每个程序有自己的一块内存不能直接访问别的程序的内存区,当然,这里调用的几个系统函数有访问别的程序内存区域的特权

    '而且每个应用程序的内存区域都映射到系统内存区域里,也就是说在这里GetProcAddress得到的VB程序里LoadLibraryA函数的入口地址和

    'notepad程序里的LoadLibraryA函数地址是一致的(映射的作用),所以不必担心.另外在VB写的程序里

    '要使用LoadLibraryA,notepad不是用vc写的吗?要注意根notepad没关系,我们现在是在自己的VB程序里面找LoadLibraryA函数的入口.

    '还有要注意函数大小写,api函数和vb不一样的。

    MyResult = CreateRemoteThread(MyRemoteProcessId, 0, 0, MyStartAddr, MyDllFileBuffer, 0, temp)

    '好了,现在该让LoadLibrary载入“c:\test.dll“吧,现在CreateRemoteThread做的就是在notepad进程中把控制权转到LoadLibraryA的入口

    '然后把notepad内存区域中的“c:\test.dll“字符串当作参数传给LoadLibraryA。现在我们的dll文件就在notepad程序中运行了

    'dll被注入notepad.exe以后会主动弹出对话框显示出notepad.exe的进程ID,表明注入成功.

    End If

    Loop While Process32Next(MySnapHandle, ProcessInfo) <> 0

    End If

    CloseHandle MySnapHandle

    End Sub

    Private Sub Form_Load()

    EnumAndInject

    End Sub

    Attribute VB_Name = "Module1"

    Public Const PROCESS_VM_READ = &H10

    Public Const TH32CS_SNAPPROCESS = &H2

    Public Const MEM_COMMIT = 4096

    Public Const PAGE_READWRITE = 4

    Public Const PROCESS_CREATE_THREAD = (&H2)

    Public Const PROCESS_VM_OPERATION = (&H8)

    Public Const PROCESS_VM_WRITE = (&H20)

    Public Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Long, ByVal lpBuffer As String, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long

    Public Declare Function GetLastError Lib "kernel32" () As Long

    Public Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As Long, ByVal lpAddress As Long, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As Long

    Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Long, ByVal lpBuffer As String, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long

    Public Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long

    Public Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long

    Public Declare Function Process32First Lib "kernel32" (ByVal hSnapshot As Long, lppe As PROCESSENTRY32) As Long

    Public Declare Function CreateToolhelp32Snapshot Lib "kernel32" (ByVal dwFlags As Long, ByVal th42ProcessID As Long) As Long

    Public Declare Function CreateRemoteThread Lib "kernel32" (ByVal hProcess As Long, ByVal lpThreadAttributes As Long, ByVal dwStackSize As Long, ByVal lpStartAddress As Long, ByVal lpParameter As Long, ByVal dwCreationFlags As Long, lpThreadId As Long) As Long

    Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long

    Public Declare Function Process32Next Lib "kernel32" (ByVal hSapshot As Long, lppe As PROCESSENTRY32) As Long

    Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long

    Public Type PROCESSENTRY32

    dwSize As Long

    cntUseage As Long

    th42ProcessID As Long

    th42DefaultHeapID As Long

    th42ModuleID As Long

    cntThreads As Long

    th42ParentProcessID As Long

    pcPriClassBase As Long

    swFlags As Long

    szExeFile As String * 1024

    End Type

    三、金山毒霸自定义杀毒和普通的有何区别

    您好!

    对于一些对于计算机有清醒认识的用户,自定义杀毒,可以进一步查看查杀的病毒名称。一般用户,直接杀毒,不用查看清理的什么病毒。前者比较专业,后者比较大众。结果是类似的,都查杀了病毒。

    希望可以帮到你!

    四、WORD中保存和另存为的区别

    区别如下:

    执行“保存”操作时,Word会将正在编辑的最后一次操作结果覆盖掉原先的存档,直接执行保存操作,不再弹出文件名填写对话框,文件会按照原来的设置进行存储。

    执行“另存为”操作时,可以选择另存为其他的文件格式,同时Word会弹出“另存为”执行窗口,可更改包括文件名、文件类型等信息,同时,保存好后将生成一个新的文件。

    步骤如下:

    1、打开Word文件

    自定义文件和所有文件的区别(自定义文件什么意思)

    2、修改其中的内容

    自定义文件和所有文件的区别(自定义文件什么意思)

    3、点击保存按钮

    自定义文件和所有文件的区别(自定义文件什么意思)

    4、Word直接进行保存操作

    自定义文件和所有文件的区别(自定义文件什么意思)

    5、再使用另存为,此时右侧会弹出多种格式,可实现快捷操作

    自定义文件和所有文件的区别(自定义文件什么意思)

    6、弹出另存为窗口,可修改文件名和改变保存类型

    自定义文件和所有文件的区别(自定义文件什么意思)

    7、此外还有其他设置可选

    自定义文件和所有文件的区别(自定义文件什么意思)

    8、键入新的文件名,点击保存

    自定义文件和所有文件的区别(自定义文件什么意思)

    9、生成新的文件

    自定义文件和所有文件的区别(自定义文件什么意思)

    以上就是关于自定义文件和所有文件的区别相关问题的回答。希望能帮到你,如有更多相关问题,您也可以联系我们的客服进行咨询,客服也会为您讲解更多精彩的知识和内容。


    推荐阅读:

    手机更换字体自定义(手机更换字体自定义软件)

    小米手机图标怎么自定义

    如何设置自定义图标(vivo手机如何设置自定义图标)

    免费私人网站建设(免费私人网站建设平台)

    网络营销产生的三点原因(网络营销产生的三点原因是)