[水]用vb写了个PCB
这学期我们学操作系统,所以得写个PCB。
于是我借鉴了一下windows的PCB,写了这个
Imports System.Runtime.InteropServices
''' <summary>
''' 这就是传说中的PCB
''' </summary>
Structure KPROCESS
Dim Header As DispatcherHeader
Dim ProfileListHead As LinkedList(Of ProcessProfileSimulator)
Dim DirectoryTableBase As UInteger
Dim LdtDescriptor As KernelGlobalDescriptorTableEntry
Dim Int21Descriptor As KernelInterruptDescriptorTableEntry
Dim IopmOffset As Short
Dim Iopl As Byte
Dim ActiveProcessors As UInteger
Dim KernelTime As UInteger
Dim UserTime As UInteger
Dim ReadyListHead As LinkedList(Of ProcessSimulator)
Dim SwapListEntry As SingleLinkedList(Of ProcessSimulator)
Dim VdmTrapcHandler As IntPtr
Dim ThreadListHead As LinkedList(Of ThreadSimulator)
Dim ProcessLock As UInteger
Dim Affinity As UInteger
Dim ProcessFlags As ProcessFlag
Dim BasePriority As SByte
Dim QuantumReset As SByte
Dim State As Byte
Dim ThreadSeed As Byte
Dim PowerState As Byte
Dim IdealNode As Byte
Dim Visited As Byte
Dim ExecuteOptions As Byte
Dim StackCount As UInteger
Dim ProcessListEntry As LinkedList(Of ProcessSimulator)
Dim CycleTime As ULong
End Structure Enum ProcessFlag
None
AutoAlignment
DisableBoost
DisableQuantum =
End Enum Structure DispatcherHeader
Dim UnionType As Byte
Dim UnionData As UnionA
<StructLayout(LayoutKind.Explicit)>
Structure UnionA
<FieldOffset(0)> Dim Abandoned As Byte
<FieldOffset()> Dim Absolute As Byte
<FieldOffset()> Dim NpxIrql As Byte
<FieldOffset()> Dim Signalling As Byte
<FieldOffset()> Dim Size As Byte
<FieldOffset()> Dim Hand As Byte
<FieldOffset()> Dim Inserted As Byte
<FieldOffset()> Dim DebugActive As Byte
<FieldOffset()> Dim DpcActive As Byte
End Structure
Dim Lock As Integer
Dim SignalState As Integer
Dim WaitListHead As LinkedList(Of ProcessSimulator)
End Structure Structure KernelGlobalDescriptorTableEntry
Dim LimitLow As Short
Dim BaseLow As Short
Dim HighWord As UInteger
End Structure Structure KernelInterruptDescriptorTableEntry
Dim Offset As Short
Dim Selector As Short
Dim Access As Short
Dim ExtendedOffset As Short
End Structure Enum KernelExecuteOptions As Byte
None
ExecuteDisable
ExecuteEnable
DisableThunkEmulation =
Permanent =
ExecuteDispatchEnable =
ImageDispatchEnable =
End Enum
那个SingleLinkedList是我自定义的
Public Class SingleLinkedList(Of T)
Public Property [Next] As SingleLinkedList(Of T)
Public Property Value As T
End Class
[水]用vb写了个PCB的更多相关文章
- abap调vb写的dll实现电子天平的读数(带控件版)
废话不多说,直接上. 鉴于abap调研的dll文件需要在wins注册,自己尝试过delphi和C#感觉不是很好,最后毅然选择了VB来写 因为需要用到MScomm控件,所以对于将要写的dll需要带for ...
- 运行vb写的程序,有些电脑上会弹出一个与office相关的窗口
到网上搜索了一下,找了几个解决方案,不过我的电脑上没出现过,所以先收藏一下,或许以后能用上. 来自:http://bbs.csdn.net/topics/380204412 今天将注册表的项一个个删除 ...
- VC调用VB写的COM
VB. 步骤: 1.创建类库:类库的创建必须分为接口和实现类:给外面提供的是COM接口: 创建了接口和类之后还要创建"Guid",这个在"工具->创建GUID&qu ...
- vb写文件时报'Invalid procedure call or argument'
原来的一段代码是这样的: Set fso3 = CreateObject("Scripting.FileSystemObject") 'msgbo ...
- VB 共享软件防破解设计技术初探(二)
VB 共享软件防破解设计技术初探(二) ×××××××××××××××××××××××××××××××××××××××××××××× 其他文章快速链接: VB 共享软件防破解设计技术初探(一)http ...
- 用VB实现SmartQQ机器人
这里为了便于介绍程序设计的流程,更多以代码形式给出,具体可用火狐浏览器的firebug插件来抓包分析,或者用谷歌浏览器的开发者工具进行抓包.抓包地址是:http://w.qq.com 第一步,是二维码 ...
- 演练:使用Xamarin.Forms开发产品介绍性质的应用(VB版)
概述 Xamarin这个使用mono和.net core的跨平台开发框架这几年在不断发展.被微软收购后的Xamarin为个人开发者提供了免费版的Xamarin for Visual Studio,吸引 ...
- 在uwp中复活常用的vb库函数
这个博文是纯原创的,转载一定要说明作者是 Nukepayload2!! 在.Net Core 中,很多地方被精简了,有个重灾区就是vb语言库.从当初的囊括vb6库函数并且附带后期绑定到现在的几个函数加 ...
- [Aaronyang] 写给自己的WPF4.5 失传的第一本古老秘籍[多扩展显示器编程]
世界上只有想不通的人,没有走不通的路 --Aaronyang的博客(www.ayjs.net)-www.8mi.me =============时隔两年后再看WPF,有些秘籍不太适合公开,公开了就不值 ...
随机推荐
- Swift: 深入理解Core Animation(一)
如果想在底层做一些改变,想实现一些特别的动画,这时除了学习Core Animation之外,别无选择. 最近在看<iOS Core Animation:Advanced Techniques&g ...
- android 开发 - 对图片进行虚化(毛玻璃效果,模糊)
概述 IPAD,IPHONE上首页背景的模糊效果是不是很好看,那么在 Android中如何实现呢.我通过一种方式实现了这样的效果. 开源库名称:anroid-image-blur 一个android ...
- android私有文件夹的访问
首先内部存储路径为/data/data/youPackageName/,下面讲解的各路径都是基于你自己的应用的内部存储路径下. 所有内部存储中保存的文件在用户卸载应用的时候会被删除. 一. files ...
- 突破GFW,使用node.js
原文链接:https://cnodejs.org/topic/4f9904f9407edba21468f31e 这个也是网上搜的,亲自试过,非常好用! 镜像使用方法(三种办法任意一种都能解决问题,建议 ...
- ExtJs Column 显示文字内容过长 使用Tootip显示全部内容
{ text: 'Column Header Blah', dataIndex: 'blah', renderer: function(value, metaData, record, rowIdx, ...
- 【PRML读书笔记-Chapter1-Introduction】1.2 Probability Theory
一个例子: 两个盒子: 一个红色:2个苹果,6个橘子; 一个蓝色:3个苹果,1个橘子; 如下图: 现在假设随机选取1个盒子,从中.取一个水果,观察它是属于哪一种水果之后,我们把它从原来的盒子中替换掉. ...
- win7左ctrl和左alt键互换
主要参考这篇文章: http://xyztony1985.blog.163.com/blog/static/3611782011752420104/ 感谢原博主 Windows Registry Ed ...
- 《Programming with Objective-C》
苹果官方文档:不稳定的传送门 读书笔记共有以下几篇,其他的知识点不重要或者已经熟悉不需记录 <Programming with Objective-C>第三章 Working with O ...
- 移动审批App开发总结
公司新需求要在手机上进行审批. 现在开发完成了. 总结:1.初步把公司的工作流模块做成RPC服务,公共服务可以进行调用. 2.服务分层,每个App的页面对应一个服务端的接口,作为前端控制器,用来从更低 ...
- Tips10:你可以像写文档一样自由的复制粘贴游戏组件(Game Object Component)
相对于添加组件后再进行调整和赋值,通过复制和粘贴已有游戏组件能够带来更高的效率.