Change a partition type

All,

How can I change the partition type using DeviceIoControl or some other API 
call? 


0
1/21/2008 11:32:37 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
801 Views

Similar Articles

[PageSpeed] 47

There are very few partition types supported.  NTFS and FATxx are supported, although
support for FAT32 has been discontinued for disks, so there isn't a lot you can change it
to.  The question is far too vague to answer, but the bottom line is (a) it isn't a
trivial thing to do and (b) there isn't a lot you can change from or to.

Please state precisely what you are trying to accomplish.
						joe
On Mon, 21 Jan 2008 18:32:37 -0500, "CodeTestDummy"
<sharp_mind.TAKETHISOUT@email.TAKETHISOUT.msn.com> wrote:

>All,
>
>How can I change the partition type using DeviceIoControl or some other API 
>call? 
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
1/22/2008 10:30:30 PM
What I am trying to to is change the partition ID.
Example NTFS is ID 7, ID 13 is a hidden partition.

ID       Name
01 : -- 12-bit FAT
02 : -- XENIX root
03 : -- XENIX /usr (obsolete)
04 : -- 16-bit FAT, partition <32 MB
05 : -- Extended Partition, (also see 0F below).
06 : -- 16-bit FAT, partition >=32 MB
07 : -- Installable file systems: HPFS or NTFS. Also, QNX and Advanced Unix.
08 : -- AIX bootable partition, AIX (Linux), SplitDrive, OS/2 (through 
Version 1.3), Dell partition spanning multiple drives (array), Commodore 
DOS.
09 : -- AIX data partition, AIX bootable (Linux), Coherent file system, QNX.
0A : -- Coherent swap partition, OPUS or OS/2 Boot Manager.
0B : -- 32-bit FAT
0C : -- 32-bit FAT, Ext. INT 13
0E : -- 16-bit FAT >= 32 MB, Ext. INT 13
0F : -- Extended Partition, Ext. INT 13
10 : -- OPUS
11 : -- Hidden 12-bit FAT
12 : -- Compaq diagnostics
14 : -- Hidden 16-bit FAT, partition <32 MB, Novell DOS 7.0 (result of bug 
in FDISK?), AST DOS with logical sectored FAT
16 : -- Hidden 16-bit FAT, partition >= 32 MB
17 : -- Hidden IFS
18 : -- AST Windows swap file
19 : -- Willowtech Photon coS
1B : -- Hidden 32-bit FAT
1C : -- Hidden 32-bit FAT, Ext INT 13
1E : -- Hidden 16-bit FAT >32 MB, Ext INT 13 (PowerQuest specific)
20 : -- Willowsoft Overture File System (OFS1)
21 : -- reserved (HP Volume Expansion, SpeedStor variant), Oxygen FSo2
22 : -- Oxygen Extended
23 : -- reserved (HP Volume Expansion, SpeedStor variant?)
24 : -- NEC MS-DOS 3.x
26 : -- reserved (HP Volume Expansion, SpeedStor variant?)
Taken from http://www.win.tue.nl/~aeb/partitions/partition_types-1.html


"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
news:ngrcp31re74go73jla9i57jitiieh1gor3@4ax.com...
> There are very few partition types supported.  NTFS and FATxx are 
> supported, although
> support for FAT32 has been discontinued for disks, so there isn't a lot 
> you can change it
> to.  The question is far too vague to answer, but the bottom line is (a) 
> it isn't a
> trivial thing to do and (b) there isn't a lot you can change from or to.
>
> Please state precisely what you are trying to accomplish.
> joe
> On Mon, 21 Jan 2008 18:32:37 -0500, "CodeTestDummy"
> <sharp_mind.TAKETHISOUT@email.TAKETHISOUT.msn.com> wrote:
>
>>All,
>>
>>How can I change the partition type using DeviceIoControl or some other 
>>API
>>call?
>>
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm 


0
1/23/2008 2:13:34 AM
This is the wrong newsgroup; use the kernel newsgroup or a device driver newsgroup.  I
don't really do file systems.  

Note that there's a whole lot more going on here than changing a partition ID.  If you
change a partition ID to say it is a this-thing instead of a that-thing, you had better
make sure that ever single byte of that partition conforms to the this-thing
specifications, not the that-thing specifications.
					joe

On Tue, 22 Jan 2008 21:13:34 -0500, "CodeTestDummy"
<sharp_mind.TAKETHISOUT@email.TAKETHISOUT.msn.com> wrote:

>What I am trying to to is change the partition ID.
>Example NTFS is ID 7, ID 13 is a hidden partition.
>
>ID       Name
>01 : -- 12-bit FAT
>02 : -- XENIX root
>03 : -- XENIX /usr (obsolete)
>04 : -- 16-bit FAT, partition <32 MB
>05 : -- Extended Partition, (also see 0F below).
>06 : -- 16-bit FAT, partition >=32 MB
>07 : -- Installable file systems: HPFS or NTFS. Also, QNX and Advanced Unix.
>08 : -- AIX bootable partition, AIX (Linux), SplitDrive, OS/2 (through 
>Version 1.3), Dell partition spanning multiple drives (array), Commodore 
>DOS.
>09 : -- AIX data partition, AIX bootable (Linux), Coherent file system, QNX.
>0A : -- Coherent swap partition, OPUS or OS/2 Boot Manager.
>0B : -- 32-bit FAT
>0C : -- 32-bit FAT, Ext. INT 13
>0E : -- 16-bit FAT >= 32 MB, Ext. INT 13
>0F : -- Extended Partition, Ext. INT 13
>10 : -- OPUS
>11 : -- Hidden 12-bit FAT
>12 : -- Compaq diagnostics
>14 : -- Hidden 16-bit FAT, partition <32 MB, Novell DOS 7.0 (result of bug 
>in FDISK?), AST DOS with logical sectored FAT
>16 : -- Hidden 16-bit FAT, partition >= 32 MB
>17 : -- Hidden IFS
>18 : -- AST Windows swap file
>19 : -- Willowtech Photon coS
>1B : -- Hidden 32-bit FAT
>1C : -- Hidden 32-bit FAT, Ext INT 13
>1E : -- Hidden 16-bit FAT >32 MB, Ext INT 13 (PowerQuest specific)
>20 : -- Willowsoft Overture File System (OFS1)
>21 : -- reserved (HP Volume Expansion, SpeedStor variant), Oxygen FSo2
>22 : -- Oxygen Extended
>23 : -- reserved (HP Volume Expansion, SpeedStor variant?)
>24 : -- NEC MS-DOS 3.x
>26 : -- reserved (HP Volume Expansion, SpeedStor variant?)
>Taken from http://www.win.tue.nl/~aeb/partitions/partition_types-1.html
>
>
>"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message 
>news:ngrcp31re74go73jla9i57jitiieh1gor3@4ax.com...
>> There are very few partition types supported.  NTFS and FATxx are 
>> supported, although
>> support for FAT32 has been discontinued for disks, so there isn't a lot 
>> you can change it
>> to.  The question is far too vague to answer, but the bottom line is (a) 
>> it isn't a
>> trivial thing to do and (b) there isn't a lot you can change from or to.
>>
>> Please state precisely what you are trying to accomplish.
>> joe
>> On Mon, 21 Jan 2008 18:32:37 -0500, "CodeTestDummy"
>> <sharp_mind.TAKETHISOUT@email.TAKETHISOUT.msn.com> wrote:
>>
>>>All,
>>>
>>>How can I change the partition type using DeviceIoControl or some other 
>>>API
>>>call?
>>>
>> Joseph M. Newcomer [MVP]
>> email: newcomer@flounder.com
>> Web: http://www.flounder.com
>> MVP Tips: http://www.flounder.com/mvp_tips.htm 
>
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15975)
1/23/2008 6:30:22 AM
Reply:

Similar Artilces:

Investment
Money 3000. Money has incorrectly classified my Stocks as Mutual Funds. How can I change that? In microsoft.public.money, Denis wrote: >Money has incorrectly classified my Stocks as Mutual Funds. >How can I change that? This could have come about when converting from Quicken. When you convert a custom data type from Quicken, it generally comes over as a fund. It is not trivial, but not as hard as it first appears. A few minutes should do it for each stock. In the details, remove the existing symbol, and rename the existing "mutual fund" to something you will never use. L...

how to:change CTL+click to pointer finger on hyperlink to website
How do I produce a "pointer finger" when over a web site or e-mail address. I currently have the CTL+clink showing. From file, preview your web site, is the pointer finger there? -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "DK" <DK@discussions.microsoft.com> wrote in message news:DE2E2CBD-F264-4EE4-901D-DACA4E011D8F@microsoft.com... > How do I produce a "pointer finger" when over a web site or e-mail address. > I currently have the CTL+clink showing. ...

EXCH 5.5
I have a test server which has exch 5.5 installed. I use this for test purpose only. I want to bring pub.edb and priv.edb from my production exchange and try to repair the folders. My test exchange and production exchange, both have different site and organisation. How can I change or add new site/organisation on my test exchange so I can use production exchange's public folder ? Uninstall and then Reinstall with the correct org and site names. -- Hope that helps. ------------------------- Jaclynn Hiranaka Enterprise Messaging Support This posting is provided "AS IS"...

Changing split pane CView class at runtime
Hello, I am trying to develop a MDI application with a spilt window, where I have 2 splitter pane at the same time: CTreeView and another View which can be changed at runtime e.g. a CView or CEditView depending at which node has been selected in the treeView. Right now I have the application running with a split window containing CTreeView and CView, but I am blank on how to change the splitter pane CView clase to the CEditView at runtime. The next question is: Is it possible to get access to the CChildFrame class from the CView class, because it is properly CChildFrame which shall do ...

changes on a list
I have a CListView (not control) view situated in a docking pane (CodeJock Toolkit Pro). I want to detect when the user selects an item in the list or changes selection on the list, but can't find the right event. I'm sure there is a OnSelChanged message, but I need to know what ON_COMMAND to use and what parameters should go on my OnSelChanged method. I have looked in the MSDN, but I need to know what event to look up to find this information and if I knew what event to look up, then I wouldn't need to look anything up!! Any advice or MSDN links appreciated. No ON_COMMA...

outlook 2007
in Outlook 2007 how do I change the emails default margins? for emails were using Memo Style The default margins are 1.30cm However when users print and holepunch, theres not enough room and it hole punches over the text. I know how to change manually, through the menu File, select PageSetup, select Memo Style. The Page Setup:Memo Style dialog displays. select tab Paper and enter Margins Top, Bottom, Left, Right 2.54cm, click OK. Its been mentioned the settings are stored in the file C:\Documents and Settings\<UserName>\Application Data\Microsoft\Outlook\OutlPrnt ...

J.P. Morgan Chase bank changes
I just got a message from JP Morgan Chase Bank that we need to make changes to our setup in order to continue getting their downloads for Money. The instruction are 12 pages long (in PDF format) and seem rather complicated and involve canceling our existing on-line accounts with Chase. There is no explanation at all about why they are making these changes. Does anyone know (or can figure out) what is going on? Links to the instructions can be found at http://www.chase.com/cm/cs?pagename=Chase/Href&urlname=shared/crb/page/QuickenMoneyJan.jsp ..Thanks -- Peace, BobJ In microso...

Change "Find Names" dialog in OWA
Hi there, Hope I have the right group.... I have a requirement to remove the "alias" details from the OWA "Find Names" dialog box .... My client doesn't want their users to see alias as it may confuse them. I have successfully removed it from the details template for normal Outlook clients, but can I remove it from the OWA dialog? Many thanks "Stuart Parker" <mrgimper@nospam-hotmail.com> wrote in message news:eCt9BMsjGHA.4212@TK2MSFTNGP03.phx.gbl... > Hi there, > > Hope I have the right group.... > > I have a requirement to rem...

Change multiple accounts to a new owner
Rather than having ot create a SQL function to do this can I change more than one accounts ownership to a different user? Q: I want to highlight 25 accounts and change the ownership to a different user. When I highlight more than one account lets say 4 accounts I goto more actions then edit. In the details tab (where you normally change the owner) the field is grayed out so I can not make a modification. Is there a simple way to give new ownership? Instead of going to actions, click on the button that is the fifth from the right - looks like a person with an arrow. This will bring up ...

I'm I the only one pissed off at BofA for changing the format they use for reporting transactions?
Instead of putting the location where the transaction took place, the transaction entry now starts with: BANK CARD PURCHASE 0980980923482348923 WTF is that? Now I'm forced to manually change the payee so that the transactions auto-classify. Am I the only one noticing this? If not, please send an email to them about it through their site. Maybe if enough people complain they'll fix this problem. Its a long shot, but worth a try. njohn said the following: > Instead of putting the location where the transaction took place, the > transaction entry now starts with: BANK CARD PURCHA...

CDialog::Create() changes foreground window
Hi In my dialog based application I must create a modeless, invisible window: class CDummyDlg : public CDialog { // (...) }; BOOL CApp::InitInstance() { // (...) InitCommonControls(); this->TBase::InitInstance(); CDummyDlg * m_dummy_dlg; this->m_dummy_dlg = new CDummyDlg(); this->m_dummy_dlg->Create(IDD); this->m_pMainWnd = this->m_dummy_dlg; // (...) } Unfortunately the CDialog::Create() method somehow changes the foreground window from, for example: Total Commander or MS Visual Studio, or any other program, starting...

Find as u type by Allen Browne question
I've used the 'find as u type' utility (http://allenbrowne.com/AppFindAsUType.html) many times successfully, but I'm now running into something I can't solve. When I base the form on a table or selection query, everything works fine. But when I base the form on a query which in itself is based on a query and a linked table I get the following behavior: 1. The form_load works fine. 2. Filtering works fine as long as the value is found. 3. When the typed value can't be found the record fields disappear and the focus is set to the field where you enter the value (th...

time of day changed after activesync
Every time I place an event in the calendar on Outlook, it is listed one hour ahead on my PocketPC after synchronizing.. But if I enter the event directly on the PocketPC and then sync, it shows the correct time on Outlook... any solutions? thanks, kevin Check your time settings on your computer clock, Outlook and the PPC - ensure that they are all using the same time zone and daylight savings time settings. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal accou...

Changing Margins Within a Document
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Is it possible to change margins - top and bottom or sides - within a document. In other words, I want certain pages to have certain margins and other pages different margins. <br><br>Thank you. <br> Mary Solomon Yes, you can do so, but it requires the use of Section Breaks. You can then specify the preferred margins independently for each section. Depending on exactly what you're trying to accomplish, however, it might be better to consider using Left & Right Indents instead. ...

Writing data from one sheet to another template sheet and change the filename
Hi Folks! I have a range of data from A2:A140 in one excel file and an other file which basically is like a template. The data from the cells A2:A140 ( one at a time) should write into Cell C4 of the template file and then save the file as (DATA.A2) PFSR Overview and (DATA.A3) PFSR Overview and so on...... Here DATA.A2 being the alphanumeric data in cell A2, A3 and so on. Can anybody please help me on this. I have like 765 individual files to create in the same way and I dont want to do it manually!! Thanks so much for your help. - Britney Cox Untested, but it did compile ok: Option ...

How to change the name of a project?
How can I change a project's name? Is it enough to rename the .dsw, .dsp, .ncb, .opt, and .plg? Or is there something subtle that will make this not work? What about just the .dsw and .dsp and deleting the other files and recompiling? open u r dsw in any text editor and replace the name of the dsw with u r desired name. then rename the file as well. be careful that the find replace dowsnt change the name of the app class cpp n h and other files which too if created via AppWizard has the same name as the project. SY "Yasoo" <Yasoo@discussions.microsoft.com> wrote in m...

CRM 3.0 New Activity Type
We are attempting to customize a CRM 3.0 installation and we need to create a new type of Activity. We need it to have all the elements of the "basic" Activity, but we want our new Activity to be on the menu of Activities once we are done. So, we should be able to select phone, e-mail, fax, letter, etc and then "our" Activity from the menu of choices. Is this possible and if so, wher do we even start? We are a non-programming organization, but we are fairly comfortable with CRM. It has at least been "friendly" to our efforts. Thank you kindly, John Hi Joh...

Change Text
In Cell A1 I have two types of text: 5/3 or 15/2 In Cell A2 I want a formula that changes the A1 text to 053 or 152. Cheers GK Try in A2: =TEXT(SUBSTITUTE(A1,"/",""),"000") -- Rgds Max xl 97 --- GMT+8, 1� 22' N 103� 45' E xdemechanik <at>yahoo<dot>com ---- "gregork" <gregork@paradise.net.nz> wrote in message news:421ee495@clear.net.nz... > In Cell A1 I have two types of text: 5/3 or 15/2 > In Cell A2 I want a formula that changes the A1 text to 053 or 152. > > Cheers > GK > > > Thanks for your ...

change OWA URL from http://servername/exchange to http://servername/webmail/exchange
Hi all, Because we want to use OWA (Exch 2003) on our extranet (e.g. extranet.domain.com) which next to OWA has to serve other websites (apache, tomcat, other iis) we want to add a directory to the exchange url, so at the firewall (which hosts the proxy server it's clear which server to choose even a second owa (the old 5.5)). We can do do this for the exchange virtual directory but have to setup this also for the other virtual dirs:exchweb, contents, public etc. Is their a simple (or hard) way to slip in a directory in the url ? Regards, Laurens On 31 Mar 2006 00:58:06 -0800, "L...

Default site on SOP transaction based on order type?
We have an inspection site set up that we use for all material that is returned to us. I'd like to customize SOP entry so that the site id defaults to this inspection site for returns. Otherwise the standard defaults for the site id would apply. Has anyone done this type of customization? Any suggestions / pointers would be appreciated. -- Jim@TurboChef VBA would enable you to add this functionality. The code is fairly simple. -- Charles Allen, MVP "Jim@TurboChef" wrote: > We have an inspection site set up that we use for all material that is > returned to ...

Named sheet to change Cells names
Situation is really tricky for me, (D;E) 4 in one peace, and i need it to be named as my sheet but not fully, Sheet name is T 060_esik (and "esik" part needs transport into cell D;E4) is it possible? I guess i explained correctly! Thnx Let's assume that your sheetname hastwo parts separated by an underscore. The following UDF will return the part following that underscore: Function sname(r As Range) Application.Volatile sname = Split(r.Parent.Name, "_")(1) End Function So if the sheetname is qwerty_asdf =sname(A1) will display: asdf -- Gary''s Student ...

change single page orientation within a publication
want to change selected page orientation between portrait and landscpae within a multipage publisher document. How do you do this? Can not selectively do this or orientation for all pages in the document changes ...

I can't change border for cell
I'd like to change the border around a selected row to a heavier one. I follow all the instructions in "Help" but it does not change the border. Hello, if you are trying to change border via icon on formatting toolbar, you shoud choose "Draw borders" and select the right line style. But you can also try to draw border by selecting Format - Cells - Border where you can also select different border styles. But selecting the style is not enough. You must first select border style (and color if you don't want automatic/black) and then select where you want to hav...

Change items to discontinued in sql
We have to discontinue a whole range of items. If we update the item type to discontinued in sql, will this work? Does Great Plains do anything in the background when we change the item type to Discontinued. Thank you. Jack: I tested this putting the DEX.INI switches to TRUE - they are: SQLLogSQLStmt=TRUE SQLLogODBCMessages=TRUE SQLLogAllODBCMessages=TRUE When I did this and then discontinued a brand new item I created here was the only statement generated: BEGIN UPDATE TWO.dbo.IV00101 SET ITEMTYPE = 2, MODIFDT = '2007.12.03' WHERE ITEMTYPE = 1 AND MODIFDT = '1900.01.0...

Investment Type #3
I am using Money 2006 Premier. I incorrectly classified a sock as a mutual fund and now can't change the investment type. The details screen does not have an appropriate check box. I deleted all transactions with the hope that I could then delete the investment and reenter it with the correct type. However Money will not allow me to delete the investment insisting there are open transactions even though they have been deleted. Can anyone help advising me how to change the investment type. A friend said something about exporting and reimporting a QIF file. In microsoft.public.money,...